!function(){"use strict";function e(e){e.fn.swiper=function(a){var s;return e(this).each(function(){var e=new t(this,a);s||(s=e)}),s}}var a,t=function(e,s){function r(e){return Math.floor(e)}function i(){var e=T.params.autoplay,a=T.slides.eq(T.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||T.params.autoplay),T.autoplayTimeoutId=setTimeout(function(){T.params.loop?(T.fixLoop(),T._slideNext(),T.emit("onAutoplay",T)):T.isEnd?s.autoplayStopOnLast?T.stopAutoplay():(T._slideTo(0),T.emit("onAutoplay",T)):(T._slideNext(),T.emit("onAutoplay",T))},e)}function n(e,t){var s=a(e.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var r;return s.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==s.length)return s[0]}function o(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){T.onResize(!0),T.emit("onObserverUpdate",T,e)})});s.observe(e,{attributes:"undefined"==typeof a.attributes||a.attributes,childList:"undefined"==typeof a.childList||a.childList,characterData:"undefined"==typeof a.characterData||a.characterData}),T.observers.push(s)}function l(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;if(!T.params.allowSwipeToNext&&(T.isHorizontal()&&39===a||!T.isHorizontal()&&40===a))return!1;if(!T.params.allowSwipeToPrev&&(T.isHorizontal()&&37===a||!T.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(T.container.parents("."+T.params.slideClass).length>0&&0===T.container.parents("."+T.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,i=window.innerHeight,n=T.container.offset();T.rtl&&(n.left=n.left-T.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+T.width,n.top],[n.left,n.top+T.height],[n.left+T.width,n.top+T.height]],l=0;l=s.left&&p[0]<=s.left+r&&p[1]>=s.top&&p[1]<=s.top+i&&(t=!0)}if(!t)return}T.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!T.rtl||37===a&&T.rtl)&&T.slideNext(),(37===a&&!T.rtl||39===a&&T.rtl)&&T.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&T.slideNext(),38===a&&T.slidePrev())}}function p(){var e="onwheel",a=e in document;if(!a){var t=document.createElement("div");t.setAttribute(e,"return;"),a="function"==typeof t[e]}return!a&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(a=document.implementation.hasFeature("Events.wheel","3.0")),a}function d(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=T.rtl?-1:1,s=u(e);if(T.params.mousewheelForceToAxis)if(T.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(T.params.mousewheelInvert&&(a=-a),T.params.freeMode){var r=T.getWrapperTranslate()+a*T.params.mousewheelSensitivity,i=T.isBeginning,n=T.isEnd;if(r>=T.minTranslate()&&(r=T.minTranslate()),r<=T.maxTranslate()&&(r=T.maxTranslate()),T.setWrapperTransition(0),T.setWrapperTranslate(r),T.updateProgress(),T.updateActiveIndex(),(!i&&T.isBeginning||!n&&T.isEnd)&&T.updateClasses(),T.params.freeModeSticky?(clearTimeout(T.mousewheel.timeout),T.mousewheel.timeout=setTimeout(function(){T.slideReset()},300)):T.params.lazyLoading&&T.lazy&&T.lazy.load(),T.emit("onScroll",T,e),T.params.autoplay&&T.params.autoplayDisableOnInteraction&&T.stopAutoplay(),0===r||r===T.maxTranslate())return}else{if((new window.Date).getTime()-T.mousewheel.lastScrollTime>60)if(a<0)if(T.isEnd&&!T.params.loop||T.animating){if(T.params.mousewheelReleaseOnEdges)return!0}else T.slideNext(),T.emit("onScroll",T,e);else if(T.isBeginning&&!T.params.loop||T.animating){if(T.params.mousewheelReleaseOnEdges)return!0}else T.slidePrev(),T.emit("onScroll",T,e);T.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function u(e){var a=10,t=40,s=800,r=0,i=0,n=0,o=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(r=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(r=i,i=0),n=r*a,o=i*a,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||o)&&e.deltaMode&&(1===e.deltaMode?(n*=t,o*=t):(n*=s,o*=s)),n&&!r&&(r=n<1?-1:1),o&&!i&&(i=o<1?-1:1),{spinX:r,spinY:i,pixelX:n,pixelY:o}}function m(e,t){e=a(e);var s,r,i,n=T.rtl?-1:1;s=e.attr("data-swiper-parallax")||"0",r=e.attr("data-swiper-parallax-x"),i=e.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):T.isHorizontal()?(r=s,i="0"):(i=s,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*n+"%":r*t*n+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",e.transform("translate3d("+r+", "+i+",0px)")}function c(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof t))return new t(e,s);var g={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},h=s&&s.virtualTranslate;s=s||{};var f={};for(var v in s)if("object"!=typeof s[v]||null===s[v]||(s[v].nodeType||s[v]===window||s[v]===document||"undefined"!=typeof Dom7&&s[v]instanceof Dom7||"undefined"!=typeof jQuery&&s[v]instanceof jQuery))f[v]=s[v];else{f[v]={};for(var w in s[v])f[v][w]=s[v][w]}for(var y in g)if("undefined"==typeof s[y])s[y]=g[y];else if("object"==typeof s[y])for(var x in g[y])"undefined"==typeof s[y][x]&&(s[y][x]=g[y][x]);var T=this;if(T.params=s,T.originalParams=f,T.classNames=[],"undefined"!=typeof a&&"undefined"!=typeof Dom7&&(a=Dom7),("undefined"!=typeof a||(a="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(T.$=a,T.currentBreakpoint=void 0,T.getActiveBreakpoint=function(){if(!T.params.breakpoints)return!1;var e,a=!1,t=[];for(e in T.params.breakpoints)T.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s=window.innerWidth&&!a&&(a=e);return a||"max"},T.setBreakpoint=function(){var e=T.getActiveBreakpoint();if(e&&T.currentBreakpoint!==e){var a=e in T.params.breakpoints?T.params.breakpoints[e]:T.originalParams,t=T.params.loop&&a.slidesPerView!==T.params.slidesPerView;for(var s in a)T.params[s]=a[s];T.currentBreakpoint=e,t&&T.destroyLoop&&T.reLoop(!0)}},T.params.breakpoints&&T.setBreakpoint(),T.container=a(e),0!==T.container.length)){if(T.container.length>1){var b=[];return T.container.each(function(){b.push(new t(this,s))}),b}T.container[0].swiper=T,T.container.data("swiper",T),T.classNames.push(T.params.containerModifierClass+T.params.direction),T.params.freeMode&&T.classNames.push(T.params.containerModifierClass+"free-mode"),T.support.flexbox||(T.classNames.push(T.params.containerModifierClass+"no-flexbox"),T.params.slidesPerColumn=1),T.params.autoHeight&&T.classNames.push(T.params.containerModifierClass+"autoheight"),(T.params.parallax||T.params.watchSlidesVisibility)&&(T.params.watchSlidesProgress=!0),T.params.touchReleaseOnEdges&&(T.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(T.params.effect)>=0&&(T.support.transforms3d?(T.params.watchSlidesProgress=!0,T.classNames.push(T.params.containerModifierClass+"3d")):T.params.effect="slide"),"slide"!==T.params.effect&&T.classNames.push(T.params.containerModifierClass+T.params.effect),"cube"===T.params.effect&&(T.params.resistanceRatio=0,T.params.slidesPerView=1,T.params.slidesPerColumn=1,T.params.slidesPerGroup=1,T.params.centeredSlides=!1,T.params.spaceBetween=0,T.params.virtualTranslate=!0,T.params.setWrapperSize=!1),"fade"!==T.params.effect&&"flip"!==T.params.effect||(T.params.slidesPerView=1,T.params.slidesPerColumn=1,T.params.slidesPerGroup=1,T.params.watchSlidesProgress=!0,T.params.spaceBetween=0,T.params.setWrapperSize=!1,"undefined"==typeof h&&(T.params.virtualTranslate=!0)),T.params.grabCursor&&T.support.touch&&(T.params.grabCursor=!1),T.wrapper=T.container.children("."+T.params.wrapperClass),T.params.pagination&&(T.paginationContainer=a(T.params.pagination),T.params.uniqueNavElements&&"string"==typeof T.params.pagination&&T.paginationContainer.length>1&&1===T.container.find(T.params.pagination).length&&(T.paginationContainer=T.container.find(T.params.pagination)),"bullets"===T.params.paginationType&&T.params.paginationClickable?T.paginationContainer.addClass(T.params.paginationModifierClass+"clickable"):T.params.paginationClickable=!1,T.paginationContainer.addClass(T.params.paginationModifierClass+T.params.paginationType)),(T.params.nextButton||T.params.prevButton)&&(T.params.nextButton&&(T.nextButton=a(T.params.nextButton),T.params.uniqueNavElements&&"string"==typeof T.params.nextButton&&T.nextButton.length>1&&1===T.container.find(T.params.nextButton).length&&(T.nextButton=T.container.find(T.params.nextButton))),T.params.prevButton&&(T.prevButton=a(T.params.prevButton),T.params.uniqueNavElements&&"string"==typeof T.params.prevButton&&T.prevButton.length>1&&1===T.container.find(T.params.prevButton).length&&(T.prevButton=T.container.find(T.params.prevButton)))),T.isHorizontal=function(){return"horizontal"===T.params.direction},T.rtl=T.isHorizontal()&&("rtl"===T.container[0].dir.toLowerCase()||"rtl"===T.container.css("direction")),T.rtl&&T.classNames.push(T.params.containerModifierClass+"rtl"),T.rtl&&(T.wrongRTL="-webkit-box"===T.wrapper.css("display")),T.params.slidesPerColumn>1&&T.classNames.push(T.params.containerModifierClass+"multirow"),T.device.android&&T.classNames.push(T.params.containerModifierClass+"android"),T.container.addClass(T.classNames.join(" ")),T.translate=0,T.progress=0,T.velocity=0,T.lockSwipeToNext=function(){T.params.allowSwipeToNext=!1,T.params.allowSwipeToPrev===!1&&T.params.grabCursor&&T.unsetGrabCursor()},T.lockSwipeToPrev=function(){T.params.allowSwipeToPrev=!1,T.params.allowSwipeToNext===!1&&T.params.grabCursor&&T.unsetGrabCursor()},T.lockSwipes=function(){T.params.allowSwipeToNext=T.params.allowSwipeToPrev=!1,T.params.grabCursor&&T.unsetGrabCursor()},T.unlockSwipeToNext=function(){T.params.allowSwipeToNext=!0,T.params.allowSwipeToPrev===!0&&T.params.grabCursor&&T.setGrabCursor()},T.unlockSwipeToPrev=function(){T.params.allowSwipeToPrev=!0,T.params.allowSwipeToNext===!0&&T.params.grabCursor&&T.setGrabCursor()},T.unlockSwipes=function(){T.params.allowSwipeToNext=T.params.allowSwipeToPrev=!0,T.params.grabCursor&&T.setGrabCursor()},T.setGrabCursor=function(e){T.container[0].style.cursor="move",T.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",T.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",T.container[0].style.cursor=e?"grabbing":"grab"},T.unsetGrabCursor=function(){T.container[0].style.cursor=""},T.params.grabCursor&&T.setGrabCursor(),T.imagesToLoad=[],T.imagesLoaded=0,T.loadImage=function(e,a,t,s,r,i){function n(){i&&i()}var o;e.complete&&r?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},T.preloadImages=function(){function e(){"undefined"!=typeof T&&null!==T&&T&&(void 0!==T.imagesLoaded&&T.imagesLoaded++,T.imagesLoaded===T.imagesToLoad.length&&(T.params.updateOnImagesReady&&T.update(),T.emit("onImagesReady",T)))}T.imagesToLoad=T.container.find("img");for(var a=0;a1)for(e=0;eT.slides.length)break;a.push(T.slides.eq(s)[0])}else a.push(T.slides.eq(T.activeIndex)[0]);for(e=0;et?r:t}t&&T.wrapper.css("height",t+"px")},T.updateContainerSize=function(){var e,a;e="undefined"!=typeof T.params.width?T.params.width:T.container[0].clientWidth,a="undefined"!=typeof T.params.height?T.params.height:T.container[0].clientHeight,0===e&&T.isHorizontal()||0===a&&!T.isHorizontal()||(e=e-parseInt(T.container.css("padding-left"),10)-parseInt(T.container.css("padding-right"),10),a=a-parseInt(T.container.css("padding-top"),10)-parseInt(T.container.css("padding-bottom"),10),T.width=e,T.height=a,T.size=T.isHorizontal()?T.width:T.height)},T.updateSlidesSize=function(){T.slides=T.wrapper.children("."+T.params.slideClass),T.snapGrid=[],T.slidesGrid=[],T.slidesSizesGrid=[];var e,a=T.params.spaceBetween,t=-T.params.slidesOffsetBefore,s=0,i=0;if("undefined"!=typeof T.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*T.size),T.virtualSize=-a,T.rtl?T.slides.css({marginLeft:"",marginTop:""}):T.slides.css({marginRight:"",marginBottom:""});var n;T.params.slidesPerColumn>1&&(n=Math.floor(T.slides.length/T.params.slidesPerColumn)===T.slides.length/T.params.slidesPerColumn?T.slides.length:Math.ceil(T.slides.length/T.params.slidesPerColumn)*T.params.slidesPerColumn,"auto"!==T.params.slidesPerView&&"row"===T.params.slidesPerColumnFill&&(n=Math.max(n,T.params.slidesPerView*T.params.slidesPerColumn)));var o,l=T.params.slidesPerColumn,p=n/l,d=p-(T.params.slidesPerColumn*p-T.slides.length);for(e=0;e1){var m,c,g;"column"===T.params.slidesPerColumnFill?(c=Math.floor(e/l),g=e-c*l,(c>d||c===d&&g===l-1)&&++g>=l&&(g=0,c++),m=c+g*n/l,u.css({"-webkit-box-ordinal-group":m,"-moz-box-ordinal-group":m,"-ms-flex-order":m,"-webkit-order":m,order:m})):(g=Math.floor(e/p),c=e-g*p),u.css("margin-"+(T.isHorizontal()?"top":"left"),0!==g&&T.params.spaceBetween&&T.params.spaceBetween+"px").attr("data-swiper-column",c).attr("data-swiper-row",g)}"none"!==u.css("display")&&("auto"===T.params.slidesPerView?(o=T.isHorizontal()?u.outerWidth(!0):u.outerHeight(!0),T.params.roundLengths&&(o=r(o))):(o=(T.size-(T.params.slidesPerView-1)*a)/T.params.slidesPerView,T.params.roundLengths&&(o=r(o)),T.isHorizontal()?T.slides[e].style.width=o+"px":T.slides[e].style.height=o+"px"),T.slides[e].swiperSlideSize=o,T.slidesSizesGrid.push(o),T.params.centeredSlides?(t=t+o/2+s/2+a,0===e&&(t=t-T.size/2-a),Math.abs(t)<.001&&(t=0),i%T.params.slidesPerGroup===0&&T.snapGrid.push(t),T.slidesGrid.push(t)):(i%T.params.slidesPerGroup===0&&T.snapGrid.push(t),T.slidesGrid.push(t),t=t+o+a),T.virtualSize+=o+a,s=o,i++)}T.virtualSize=Math.max(T.virtualSize,T.size)+T.params.slidesOffsetAfter;var h;if(T.rtl&&T.wrongRTL&&("slide"===T.params.effect||"coverflow"===T.params.effect)&&T.wrapper.css({width:T.virtualSize+T.params.spaceBetween+"px"}),T.support.flexbox&&!T.params.setWrapperSize||(T.isHorizontal()?T.wrapper.css({width:T.virtualSize+T.params.spaceBetween+"px"}):T.wrapper.css({height:T.virtualSize+T.params.spaceBetween+"px"})),T.params.slidesPerColumn>1&&(T.virtualSize=(o+T.params.spaceBetween)*n,T.virtualSize=Math.ceil(T.virtualSize/T.params.slidesPerColumn)-T.params.spaceBetween,T.isHorizontal()?T.wrapper.css({width:T.virtualSize+T.params.spaceBetween+"px"}):T.wrapper.css({height:T.virtualSize+T.params.spaceBetween+"px"}),T.params.centeredSlides)){for(h=[],e=0;e1&&T.snapGrid.push(T.virtualSize-T.size)}0===T.snapGrid.length&&(T.snapGrid=[0]),0!==T.params.spaceBetween&&(T.isHorizontal()?T.rtl?T.slides.css({marginLeft:a+"px"}):T.slides.css({marginRight:a+"px"}):T.slides.css({marginBottom:a+"px"})),T.params.watchSlidesProgress&&T.updateSlidesOffset()}},T.updateSlidesOffset=function(){for(var e=0;eT.size&&(s=!0));for(a=T.activeIndex-1;a>=0;a--)T.slides[a]&&!s&&(r+=T.slides[a].swiperSlideSize,t++,r>T.size&&(s=!0))}else for(e=T.activeIndex+1;e=0&&i0&&n<=T.size||i<=0&&n>=T.size;o&&T.slides.eq(t).addClass(T.params.slideVisibleClass)}s.progress=T.rtl?-r:r}}},T.updateProgress=function(e){"undefined"==typeof e&&(e=T.translate||0);var a=T.maxTranslate()-T.minTranslate(),t=T.isBeginning,s=T.isEnd;0===a?(T.progress=0,T.isBeginning=T.isEnd=!0):(T.progress=(e-T.minTranslate())/a,T.isBeginning=T.progress<=0,T.isEnd=T.progress>=1),T.isBeginning&&!t&&T.emit("onReachBeginning",T),T.isEnd&&!s&&T.emit("onReachEnd",T),T.params.watchSlidesProgress&&T.updateSlidesProgress(e),T.emit("onProgress",T,T.progress)},T.updateActiveIndex=function(){var e,a,t,s=T.rtl?T.translate:-T.translate;for(a=0;a=T.slidesGrid[a]&&s=T.slidesGrid[a]&&s=T.slidesGrid[a]&&(e=a);T.params.normalizeSlideIndex&&(e<0||"undefined"==typeof e)&&(e=0),t=Math.floor(e/T.params.slidesPerGroup),t>=T.snapGrid.length&&(t=T.snapGrid.length-1),e!==T.activeIndex&&(T.snapIndex=t,T.previousIndex=T.activeIndex,T.activeIndex=e,T.updateClasses(),T.updateRealIndex())},T.updateRealIndex=function(){T.realIndex=parseInt(T.slides.eq(T.activeIndex).attr("data-swiper-slide-index")||T.activeIndex,10)},T.updateClasses=function(){T.slides.removeClass(T.params.slideActiveClass+" "+T.params.slideNextClass+" "+T.params.slidePrevClass+" "+T.params.slideDuplicateActiveClass+" "+T.params.slideDuplicateNextClass+" "+T.params.slideDuplicatePrevClass);var e=T.slides.eq(T.activeIndex);e.addClass(T.params.slideActiveClass),s.loop&&(e.hasClass(T.params.slideDuplicateClass)?T.wrapper.children("."+T.params.slideClass+":not(."+T.params.slideDuplicateClass+')[data-swiper-slide-index="'+T.realIndex+'"]').addClass(T.params.slideDuplicateActiveClass):T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+T.realIndex+'"]').addClass(T.params.slideDuplicateActiveClass));var t=e.next("."+T.params.slideClass).addClass(T.params.slideNextClass);T.params.loop&&0===t.length&&(t=T.slides.eq(0),t.addClass(T.params.slideNextClass));var r=e.prev("."+T.params.slideClass).addClass(T.params.slidePrevClass);if(T.params.loop&&0===r.length&&(r=T.slides.eq(-1),r.addClass(T.params.slidePrevClass)),s.loop&&(t.hasClass(T.params.slideDuplicateClass)?T.wrapper.children("."+T.params.slideClass+":not(."+T.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicateNextClass):T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicateNextClass),r.hasClass(T.params.slideDuplicateClass)?T.wrapper.children("."+T.params.slideClass+":not(."+T.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicatePrevClass):T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(T.params.slideDuplicatePrevClass)),T.paginationContainer&&T.paginationContainer.length>0){var i,n=T.params.loop?Math.ceil((T.slides.length-2*T.loopedSlides)/T.params.slidesPerGroup):T.snapGrid.length;if(T.params.loop?(i=Math.ceil((T.activeIndex-T.loopedSlides)/T.params.slidesPerGroup),i>T.slides.length-1-2*T.loopedSlides&&(i-=T.slides.length-2*T.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==T.params.paginationType&&(i=n+i)):i="undefined"!=typeof T.snapIndex?T.snapIndex:T.activeIndex||0,"bullets"===T.params.paginationType&&T.bullets&&T.bullets.length>0&&(T.bullets.removeClass(T.params.bulletActiveClass),T.paginationContainer.length>1?T.bullets.each(function(){a(this).index()===i&&a(this).addClass(T.params.bulletActiveClass)}):T.bullets.eq(i).addClass(T.params.bulletActiveClass)),"fraction"===T.params.paginationType&&(T.paginationContainer.find("."+T.params.paginationCurrentClass).text(i+1),T.paginationContainer.find("."+T.params.paginationTotalClass).text(n)),"progress"===T.params.paginationType){var o=(i+1)/n,l=o,p=1;T.isHorizontal()||(p=o,l=1),T.paginationContainer.find("."+T.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(T.params.speed)}"custom"===T.params.paginationType&&T.params.paginationCustomRender&&(T.paginationContainer.html(T.params.paginationCustomRender(T,i+1,n)),T.emit("onPaginationRendered",T,T.paginationContainer[0]))}T.params.loop||(T.params.prevButton&&T.prevButton&&T.prevButton.length>0&&(T.isBeginning?(T.prevButton.addClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.disable(T.prevButton)):(T.prevButton.removeClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.enable(T.prevButton))),T.params.nextButton&&T.nextButton&&T.nextButton.length>0&&(T.isEnd?(T.nextButton.addClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.disable(T.nextButton)):(T.nextButton.removeClass(T.params.buttonDisabledClass),T.params.a11y&&T.a11y&&T.a11y.enable(T.nextButton))))},T.updatePagination=function(){if(T.params.pagination&&T.paginationContainer&&T.paginationContainer.length>0){var e="";if("bullets"===T.params.paginationType){for(var a=T.params.loop?Math.ceil((T.slides.length-2*T.loopedSlides)/T.params.slidesPerGroup):T.snapGrid.length,t=0;t";T.paginationContainer.html(e),T.bullets=T.paginationContainer.find("."+T.params.bulletClass),T.params.paginationClickable&&T.params.a11y&&T.a11y&&T.a11y.initPagination()}"fraction"===T.params.paginationType&&(e=T.params.paginationFractionRender?T.params.paginationFractionRender(T,T.params.paginationCurrentClass,T.params.paginationTotalClass):' / ',T.paginationContainer.html(e)),"progress"===T.params.paginationType&&(e=T.params.paginationProgressRender?T.params.paginationProgressRender(T,T.params.paginationProgressbarClass):'',T.paginationContainer.html(e)),"custom"!==T.params.paginationType&&T.emit("onPaginationRendered",T,T.paginationContainer[0])}},T.update=function(e){function a(){T.rtl?-T.translate:T.translate;s=Math.min(Math.max(T.translate,T.maxTranslate()),T.minTranslate()),T.setWrapperTranslate(s),T.updateActiveIndex(),T.updateClasses()}if(T)if(T.updateContainerSize(),T.updateSlidesSize(),T.updateProgress(),T.updatePagination(),T.updateClasses(),T.params.scrollbar&&T.scrollbar&&T.scrollbar.set(),e){var t,s;T.controller&&T.controller.spline&&(T.controller.spline=void 0),T.params.freeMode?(a(),T.params.autoHeight&&T.updateAutoHeight()):(t=("auto"===T.params.slidesPerView||T.params.slidesPerView>1)&&T.isEnd&&!T.params.centeredSlides?T.slideTo(T.slides.length-1,0,!1,!0):T.slideTo(T.activeIndex,0,!1,!0),t||a())}else T.params.autoHeight&&T.updateAutoHeight()},T.onResize=function(e){T.params.breakpoints&&T.setBreakpoint();var a=T.params.allowSwipeToPrev,t=T.params.allowSwipeToNext;T.params.allowSwipeToPrev=T.params.allowSwipeToNext=!0,T.updateContainerSize(),T.updateSlidesSize(),("auto"===T.params.slidesPerView||T.params.freeMode||e)&&T.updatePagination(),T.params.scrollbar&&T.scrollbar&&T.scrollbar.set(),T.controller&&T.controller.spline&&(T.controller.spline=void 0);var s=!1;if(T.params.freeMode){var r=Math.min(Math.max(T.translate,T.maxTranslate()),T.minTranslate());T.setWrapperTranslate(r),T.updateActiveIndex(),T.updateClasses(),T.params.autoHeight&&T.updateAutoHeight()}else T.updateClasses(),s=("auto"===T.params.slidesPerView||T.params.slidesPerView>1)&&T.isEnd&&!T.params.centeredSlides?T.slideTo(T.slides.length-1,0,!1,!0):T.slideTo(T.activeIndex,0,!1,!0);T.params.lazyLoading&&!s&&T.lazy&&T.lazy.load(),T.params.allowSwipeToPrev=a,T.params.allowSwipeToNext=t},T.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?T.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(T.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),T.touchEvents={start:T.support.touch||!T.params.simulateTouch?"touchstart":T.touchEventsDesktop.start,move:T.support.touch||!T.params.simulateTouch?"touchmove":T.touchEventsDesktop.move,end:T.support.touch||!T.params.simulateTouch?"touchend":T.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===T.params.touchEventsTarget?T.container:T.wrapper).addClass("swiper-wp8-"+T.params.direction),T.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===T.params.touchEventsTarget?T.container[0]:T.wrapper[0],i=T.support.touch?r:document,n=!!T.params.nested;if(T.browser.ie)r[t](T.touchEvents.start,T.onTouchStart,!1),i[t](T.touchEvents.move,T.onTouchMove,n),i[t](T.touchEvents.end,T.onTouchEnd,!1);else{if(T.support.touch){var o=!("touchstart"!==T.touchEvents.start||!T.support.passiveListener||!T.params.passiveListeners)&&{passive:!0,capture:!1};r[t](T.touchEvents.start,T.onTouchStart,o),r[t](T.touchEvents.move,T.onTouchMove,n),r[t](T.touchEvents.end,T.onTouchEnd,o)}(s.simulateTouch&&!T.device.ios&&!T.device.android||s.simulateTouch&&!T.support.touch&&T.device.ios)&&(r[t]("mousedown",T.onTouchStart,!1),document[t]("mousemove",T.onTouchMove,n),document[t]("mouseup",T.onTouchEnd,!1))}window[t]("resize",T.onResize),T.params.nextButton&&T.nextButton&&T.nextButton.length>0&&(T.nextButton[a]("click",T.onClickNext),T.params.a11y&&T.a11y&&T.nextButton[a]("keydown",T.a11y.onEnterKey)),T.params.prevButton&&T.prevButton&&T.prevButton.length>0&&(T.prevButton[a]("click",T.onClickPrev),T.params.a11y&&T.a11y&&T.prevButton[a]("keydown",T.a11y.onEnterKey)),T.params.pagination&&T.params.paginationClickable&&(T.paginationContainer[a]("click","."+T.params.bulletClass,T.onClickIndex),T.params.a11y&&T.a11y&&T.paginationContainer[a]("keydown","."+T.params.bulletClass,T.a11y.onEnterKey)),(T.params.preventClicks||T.params.preventClicksPropagation)&&r[t]("click",T.preventClicks,!0); },T.attachEvents=function(){T.initEvents()},T.detachEvents=function(){T.initEvents(!0)},T.allowClick=!0,T.preventClicks=function(e){T.allowClick||(T.params.preventClicks&&e.preventDefault(),T.params.preventClicksPropagation&&T.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},T.onClickNext=function(e){e.preventDefault(),T.isEnd&&!T.params.loop||T.slideNext()},T.onClickPrev=function(e){e.preventDefault(),T.isBeginning&&!T.params.loop||T.slidePrev()},T.onClickIndex=function(e){e.preventDefault();var t=a(this).index()*T.params.slidesPerGroup;T.params.loop&&(t+=T.loopedSlides),T.slideTo(t)},T.updateClickedSlide=function(e){var t=n(e,"."+T.params.slideClass),s=!1;if(t)for(var r=0;rT.slides.length-T.loopedSlides+l/2?(T.fixLoop(),o=T.wrapper.children("."+T.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+T.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){T.slideTo(o)},0)):T.slideTo(o):o>T.slides.length-l?(T.fixLoop(),o=T.wrapper.children("."+T.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+T.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){T.slideTo(o)},0)):T.slideTo(o)}else T.slideTo(o)}};var S,C,z,M,P,E,I,k,D,L,B="input, select, textarea, button, video",H=Date.now(),G=[];T.animating=!1,T.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var X,Y;T.onTouchStart=function(e){if(e.originalEvent&&(e=e.originalEvent),X="touchstart"===e.type,X||!("which"in e)||3!==e.which){if(T.params.noSwiping&&n(e,"."+T.params.noSwipingClass))return void(T.allowClick=!0);if(!T.params.swipeHandler||n(e,T.params.swipeHandler)){var t=T.touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s=T.touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;if(!(T.device.ios&&T.params.iOSEdgeSwipeDetection&&t<=T.params.iOSEdgeSwipeThreshold)){if(S=!0,C=!1,z=!0,P=void 0,Y=void 0,T.touches.startX=t,T.touches.startY=s,M=Date.now(),T.allowClick=!0,T.updateContainerSize(),T.swipeDirection=void 0,T.params.threshold>0&&(k=!1),"touchstart"!==e.type){var r=!0;a(e.target).is(B)&&(r=!1),document.activeElement&&a(document.activeElement).is(B)&&document.activeElement.blur(),r&&e.preventDefault()}T.emit("onTouchStart",T,e)}}}},T.onTouchMove=function(e){if(e.originalEvent&&(e=e.originalEvent),!X||"mousemove"!==e.type){if(e.preventedByNestedSwiper)return T.touches.startX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,void(T.touches.startY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY);if(T.params.onlyExternal)return T.allowClick=!1,void(S&&(T.touches.startX=T.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,T.touches.startY=T.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,M=Date.now()));if(X&&T.params.touchReleaseOnEdges&&!T.params.loop)if(T.isHorizontal()){if(T.touches.currentXT.touches.startX&&T.translate>=T.minTranslate())return}else if(T.touches.currentYT.touches.startY&&T.translate>=T.minTranslate())return;if(X&&document.activeElement&&e.target===document.activeElement&&a(e.target).is(B))return C=!0,void(T.allowClick=!1);if(z&&T.emit("onTouchMove",T,e),!(e.targetTouches&&e.targetTouches.length>1)){if(T.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,T.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,"undefined"==typeof P){var t;T.isHorizontal()&&T.touches.currentY===T.touches.startY||!T.isHorizontal()&&T.touches.currentX===T.touches.startX?P=!1:(t=180*Math.atan2(Math.abs(T.touches.currentY-T.touches.startY),Math.abs(T.touches.currentX-T.touches.startX))/Math.PI,P=T.isHorizontal()?t>T.params.touchAngle:90-t>T.params.touchAngle)}if(P&&T.emit("onTouchMoveOpposite",T,e),"undefined"==typeof Y&&T.browser.ieTouch&&(T.touches.currentX===T.touches.startX&&T.touches.currentY===T.touches.startY||(Y=!0)),S){if(P)return void(S=!1);if(Y||!T.browser.ieTouch){T.allowClick=!1,T.emit("onSliderMove",T,e),e.preventDefault(),T.params.touchMoveStopPropagation&&!T.params.nested&&e.stopPropagation(),C||(s.loop&&T.fixLoop(),I=T.getWrapperTranslate(),T.setWrapperTransition(0),T.animating&&T.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),T.params.autoplay&&T.autoplaying&&(T.params.autoplayDisableOnInteraction?T.stopAutoplay():T.pauseAutoplay()),L=!1,!T.params.grabCursor||T.params.allowSwipeToNext!==!0&&T.params.allowSwipeToPrev!==!0||T.setGrabCursor(!0)),C=!0;var r=T.touches.diff=T.isHorizontal()?T.touches.currentX-T.touches.startX:T.touches.currentY-T.touches.startY;r*=T.params.touchRatio,T.rtl&&(r=-r),T.swipeDirection=r>0?"prev":"next",E=r+I;var i=!0;if(r>0&&E>T.minTranslate()?(i=!1,T.params.resistance&&(E=T.minTranslate()-1+Math.pow(-T.minTranslate()+I+r,T.params.resistanceRatio))):r<0&&EI&&(E=I),T.params.threshold>0){if(!(Math.abs(r)>T.params.threshold||k))return void(E=I);if(!k)return k=!0,T.touches.startX=T.touches.currentX,T.touches.startY=T.touches.currentY,E=I,void(T.touches.diff=T.isHorizontal()?T.touches.currentX-T.touches.startX:T.touches.currentY-T.touches.startY)}T.params.followFinger&&((T.params.freeMode||T.params.watchSlidesProgress)&&T.updateActiveIndex(),T.params.freeMode&&(0===G.length&&G.push({position:T.touches[T.isHorizontal()?"startX":"startY"],time:M}),G.push({position:T.touches[T.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),T.updateProgress(E),T.setWrapperTranslate(E))}}}}},T.onTouchEnd=function(e){if(e.originalEvent&&(e=e.originalEvent),z&&T.emit("onTouchEnd",T,e),z=!1,S){T.params.grabCursor&&C&&S&&(T.params.allowSwipeToNext===!0||T.params.allowSwipeToPrev===!0)&&T.setGrabCursor(!1);var t=Date.now(),s=t-M;if(T.allowClick&&(T.updateClickedSlide(e),T.emit("onTap",T,e),s<300&&t-H>300&&(D&&clearTimeout(D),D=setTimeout(function(){T&&(T.params.paginationHide&&T.paginationContainer.length>0&&!a(e.target).hasClass(T.params.bulletClass)&&T.paginationContainer.toggleClass(T.params.paginationHiddenClass),T.emit("onClick",T,e))},300)),s<300&&t-H<300&&(D&&clearTimeout(D),T.emit("onDoubleTap",T,e))),H=Date.now(),setTimeout(function(){T&&(T.allowClick=!0)},0),!S||!C||!T.swipeDirection||0===T.touches.diff||E===I)return void(S=C=!1);S=C=!1;var r;if(r=T.params.followFinger?T.rtl?T.translate:-T.translate:-E,T.params.freeMode){if(r<-T.minTranslate())return void T.slideTo(T.activeIndex);if(r>-T.maxTranslate())return void(T.slides.length1){var i=G.pop(),n=G.pop(),o=i.position-n.position,l=i.time-n.time;T.velocity=o/l,T.velocity=T.velocity/2,Math.abs(T.velocity)150||(new window.Date).getTime()-i.time>300)&&(T.velocity=0)}else T.velocity=0;T.velocity=T.velocity*T.params.freeModeMomentumVelocityRatio,G.length=0;var p=1e3*T.params.freeModeMomentumRatio,d=T.velocity*p,u=T.translate+d;T.rtl&&(u=-u);var m,c=!1,g=20*Math.abs(T.velocity)*T.params.freeModeMomentumBounceRatio;if(uT.minTranslate())T.params.freeModeMomentumBounce?(u-T.minTranslate()>g&&(u=T.minTranslate()+g),m=T.minTranslate(),c=!0,L=!0):u=T.minTranslate();else if(T.params.freeModeSticky){var h,f=0;for(f=0;f-u){h=f;break}u=Math.abs(T.snapGrid[h]-u)=T.params.longSwipesMs)&&(T.updateProgress(),T.updateActiveIndex()))}var v,w=0,y=T.slidesSizesGrid[0];for(v=0;v=T.slidesGrid[v]&&r=T.slidesGrid[v]&&(w=v,y=T.slidesGrid[T.slidesGrid.length-1]-T.slidesGrid[T.slidesGrid.length-2]);var x=(r-T.slidesGrid[w])/y;if(s>T.params.longSwipesMs){if(!T.params.longSwipes)return void T.slideTo(T.activeIndex);"next"===T.swipeDirection&&(x>=T.params.longSwipesRatio?T.slideTo(w+T.params.slidesPerGroup):T.slideTo(w)),"prev"===T.swipeDirection&&(x>1-T.params.longSwipesRatio?T.slideTo(w+T.params.slidesPerGroup):T.slideTo(w))}else{if(!T.params.shortSwipes)return void T.slideTo(T.activeIndex);"next"===T.swipeDirection&&T.slideTo(w+T.params.slidesPerGroup),"prev"===T.swipeDirection&&T.slideTo(w)}}},T._slideTo=function(e,a){return T.slideTo(e,a,!0,!0)},T.slideTo=function(e,a,t,s){"undefined"==typeof t&&(t=!0),"undefined"==typeof e&&(e=0),e<0&&(e=0),T.snapIndex=Math.floor(e/T.params.slidesPerGroup),T.snapIndex>=T.snapGrid.length&&(T.snapIndex=T.snapGrid.length-1);var r=-T.snapGrid[T.snapIndex];if(T.params.autoplay&&T.autoplaying&&(s||!T.params.autoplayDisableOnInteraction?T.pauseAutoplay(a):T.stopAutoplay()),T.updateProgress(r),T.params.normalizeSlideIndex)for(var i=0;i=Math.floor(100*T.slidesGrid[i])&&(e=i);return!(!T.params.allowSwipeToNext&&rT.translate&&r>T.maxTranslate()&&(T.activeIndex||0)!==e)&&("undefined"==typeof a&&(a=T.params.speed),T.previousIndex=T.activeIndex||0,T.activeIndex=e,T.updateRealIndex(),T.rtl&&-r===T.translate||!T.rtl&&r===T.translate?(T.params.autoHeight&&T.updateAutoHeight(),T.updateClasses(),"slide"!==T.params.effect&&T.setWrapperTranslate(r),!1):(T.updateClasses(),T.onTransitionStart(t),0===a||T.browser.lteIE9?(T.setWrapperTranslate(r),T.setWrapperTransition(0),T.onTransitionEnd(t)):(T.setWrapperTranslate(r),T.setWrapperTransition(a),T.animating||(T.animating=!0,T.wrapper.transitionEnd(function(){T&&T.onTransitionEnd(t)}))),!0)))},T.onTransitionStart=function(e){"undefined"==typeof e&&(e=!0),T.params.autoHeight&&T.updateAutoHeight(),T.lazy&&T.lazy.onTransitionStart(),e&&(T.emit("onTransitionStart",T),T.activeIndex!==T.previousIndex&&(T.emit("onSlideChangeStart",T),T.activeIndex>T.previousIndex?T.emit("onSlideNextStart",T):T.emit("onSlidePrevStart",T)))},T.onTransitionEnd=function(e){T.animating=!1,T.setWrapperTransition(0),"undefined"==typeof e&&(e=!0),T.lazy&&T.lazy.onTransitionEnd(),e&&(T.emit("onTransitionEnd",T),T.activeIndex!==T.previousIndex&&(T.emit("onSlideChangeEnd",T),T.activeIndex>T.previousIndex?T.emit("onSlideNextEnd",T):T.emit("onSlidePrevEnd",T))),T.params.history&&T.history&&T.history.setHistory(T.params.history,T.activeIndex),T.params.hashnav&&T.hashnav&&T.hashnav.setHash()},T.slideNext=function(e,a,t){if(T.params.loop){if(T.animating)return!1;T.fixLoop();T.container[0].clientLeft;return T.slideTo(T.activeIndex+T.params.slidesPerGroup,a,e,t)}return T.slideTo(T.activeIndex+T.params.slidesPerGroup,a,e,t)},T._slideNext=function(e){return T.slideNext(!0,e,!0)},T.slidePrev=function(e,a,t){if(T.params.loop){if(T.animating)return!1;T.fixLoop();T.container[0].clientLeft;return T.slideTo(T.activeIndex-1,a,e,t)}return T.slideTo(T.activeIndex-1,a,e,t)},T._slidePrev=function(e){return T.slidePrev(!0,e,!0)},T.slideReset=function(e,a,t){return T.slideTo(T.activeIndex,a,e)},T.disableTouchControl=function(){return T.params.onlyExternal=!0,!0},T.enableTouchControl=function(){return T.params.onlyExternal=!1,!0},T.setWrapperTransition=function(e,a){T.wrapper.transition(e),"slide"!==T.params.effect&&T.effects[T.params.effect]&&T.effects[T.params.effect].setTransition(e),T.params.parallax&&T.parallax&&T.parallax.setTransition(e),T.params.scrollbar&&T.scrollbar&&T.scrollbar.setTransition(e),T.params.control&&T.controller&&T.controller.setTransition(e,a),T.emit("onSetTransition",T,e)},T.setWrapperTranslate=function(e,a,t){var s=0,i=0,n=0;T.isHorizontal()?s=T.rtl?-e:e:i=e,T.params.roundLengths&&(s=r(s),i=r(i)),T.params.virtualTranslate||(T.support.transforms3d?T.wrapper.transform("translate3d("+s+"px, "+i+"px, "+n+"px)"):T.wrapper.transform("translate("+s+"px, "+i+"px)")),T.translate=T.isHorizontal()?s:i;var o,l=T.maxTranslate()-T.minTranslate();o=0===l?0:(e-T.minTranslate())/l,o!==T.progress&&T.updateProgress(e),a&&T.updateActiveIndex(),"slide"!==T.params.effect&&T.effects[T.params.effect]&&T.effects[T.params.effect].setTranslate(T.translate),T.params.parallax&&T.parallax&&T.parallax.setTranslate(T.translate),T.params.scrollbar&&T.scrollbar&&T.scrollbar.setTranslate(T.translate),T.params.control&&T.controller&&T.controller.setTranslate(T.translate,t),T.emit("onSetTranslate",T,T.translate)},T.getTranslate=function(e,a){var t,s,r,i;return"undefined"==typeof a&&(a="x"),T.params.virtualTranslate?T.rtl?-T.translate:T.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=r.transform||r.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===s?"":s)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),T.rtl&&s&&(s=-s),s||0)},T.getWrapperTranslate=function(e){return"undefined"==typeof e&&(e=T.isHorizontal()?"x":"y"),T.getTranslate(T.wrapper[0],e)},T.observers=[],T.initObservers=function(){if(T.params.observeParents)for(var e=T.container.parents(),a=0;ae.length&&(T.loopedSlides=e.length);var t,s=[],r=[];for(e.each(function(t,i){var n=a(this);t=e.length-T.loopedSlides&&s.push(i),n.attr("data-swiper-slide-index",t)}),t=0;t=0;t--)T.wrapper.prepend(a(s[t].cloneNode(!0)).addClass(T.params.slideDuplicateClass))},T.destroyLoop=function(){T.wrapper.children("."+T.params.slideClass+"."+T.params.slideDuplicateClass).remove(),T.slides.removeAttr("data-swiper-slide-index")},T.reLoop=function(e){var a=T.activeIndex-T.loopedSlides;T.destroyLoop(),T.createLoop(),T.updateSlidesSize(),e&&T.slideTo(a+T.loopedSlides,0,!1)},T.fixLoop=function(){var e;T.activeIndex=2*T.loopedSlides||T.activeIndex>T.slides.length-2*T.params.slidesPerView)&&(e=-T.slides.length+T.activeIndex+T.loopedSlides,e+=T.loopedSlides,T.slideTo(e,0,!1,!0))},T.appendSlide=function(e){if(T.params.loop&&T.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a'),t.append(d)),0===u.length&&(u=a('
'),t.append(u)),d.length&&(d[0].style.opacity=Math.max(-s,0)),u.length&&(u[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){if(T.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),T.params.virtualTranslate&&0!==e){var t=!1;T.slides.eq(T.activeIndex).transitionEnd(function(){if(!t&&T&&a(this).hasClass(T.params.slideActiveClass)){t=!0,T.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s'),T.wrapper.append(e)),e.css({height:T.width+"px"})):(e=T.container.find(".swiper-cube-shadow"),0===e.length&&(e=a('
'),T.container.append(e))));for(var s=0;s-1&&(t=90*s+90*o,T.rtl&&(t=90*-s-90*o)),r.transform(u),T.params.cube.slideShadows){var m=T.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),c=T.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===m.length&&(m=a('
'),r.append(m)),0===c.length&&(c=a('
'),r.append(c)),m.length&&(m[0].style.opacity=Math.max(-o,0)),c.length&&(c[0].style.opacity=Math.max(o,0))}}if(T.wrapper.css({"-webkit-transform-origin":"50% 50% -"+T.size/2+"px","-moz-transform-origin":"50% 50% -"+T.size/2+"px","-ms-transform-origin":"50% 50% -"+T.size/2+"px","transform-origin":"50% 50% -"+T.size/2+"px"}),T.params.cube.shadow)if(T.isHorizontal())e.transform("translate3d(0px, "+(T.width/2+T.params.cube.shadowOffset)+"px, "+-T.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+T.params.cube.shadowScale+")");else{var g=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*g*Math.PI/360)/2+Math.cos(2*g*Math.PI/360)/2),f=T.params.cube.shadowScale,v=T.params.cube.shadowScale/h,w=T.params.cube.shadowOffset;e.transform("scale3d("+f+", 1, "+v+") translate3d(0px, "+(T.height/2+w)+"px, "+-T.height/2/v+"px) rotateX(-90deg)")}var y=T.isSafari||T.isUiWebView?-T.size/2:0;T.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(T.isHorizontal()?0:t)+"deg) rotateY("+(T.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){T.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),T.params.cube.shadow&&!T.isHorizontal()&&T.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var e=T.translate,t=T.isHorizontal()?-e+T.width/2:-e+T.height/2,s=T.isHorizontal()?T.params.coverflow.rotate:-T.params.coverflow.rotate,r=T.params.coverflow.depth,i=0,n=T.slides.length;i'),o.append(v)),0===w.length&&(w=a('
'),o.append(w)),v.length&&(v[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(T.browser.ie){var y=T.wrapper[0].style;y.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){T.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},T.lazy={initialImageLoaded:!1,loadImageInSlide:function(e,t){if("undefined"!=typeof e&&("undefined"==typeof t&&(t=!0),0!==T.slides.length)){var s=T.slides.eq(e),r=s.find("."+T.params.lazyLoadingClass+":not(."+T.params.lazyStatusLoadedClass+"):not(."+T.params.lazyStatusLoadingClass+")");!s.hasClass(T.params.lazyLoadingClass)||s.hasClass(T.params.lazyStatusLoadedClass)||s.hasClass(T.params.lazyStatusLoadingClass)||(r=r.add(s[0])),0!==r.length&&r.each(function(){var e=a(this);e.addClass(T.params.lazyStatusLoadingClass);var r=e.attr("data-background"),i=e.attr("data-src"),n=e.attr("data-srcset"),o=e.attr("data-sizes");T.loadImage(e[0],i||r,n,o,!1,function(){if(r?(e.css("background-image",'url("'+r+'")'),e.removeAttr("data-background")):(n&&(e.attr("srcset",n),e.removeAttr("data-srcset")),o&&(e.attr("sizes",o),e.removeAttr("data-sizes")),i&&(e.attr("src",i),e.removeAttr("data-src"))),e.addClass(T.params.lazyStatusLoadedClass).removeClass(T.params.lazyStatusLoadingClass),s.find("."+T.params.lazyPreloaderClass+", ."+T.params.preloaderClass).remove(),T.params.loop&&t){var a=s.attr("data-swiper-slide-index");if(s.hasClass(T.params.slideDuplicateClass)){var l=T.wrapper.children('[data-swiper-slide-index="'+a+'"]:not(.'+T.params.slideDuplicateClass+")");T.lazy.loadImageInSlide(l.index(),!1)}else{var p=T.wrapper.children("."+T.params.slideDuplicateClass+'[data-swiper-slide-index="'+a+'"]');T.lazy.loadImageInSlide(p.index(),!1)}}T.emit("onLazyImageReady",T,s[0],e[0])}),T.emit("onLazyImageLoad",T,s[0],e[0])})}},load:function(){var e,t=T.params.slidesPerView;if("auto"===t&&(t=0),T.lazy.initialImageLoaded||(T.lazy.initialImageLoaded=!0),T.params.watchSlidesVisibility)T.wrapper.children("."+T.params.slideVisibleClass).each(function(){T.lazy.loadImageInSlide(a(this).index())});else if(t>1)for(e=T.activeIndex;e1||T.params.lazyLoadingInPrevNextAmount&&T.params.lazyLoadingInPrevNextAmount>1){var s=T.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(T.activeIndex+r+Math.max(s,r),T.slides.length),n=Math.max(T.activeIndex-Math.max(r,s),0);for(e=T.activeIndex+t;e0&&T.lazy.loadImageInSlide(o.index());var l=T.wrapper.children("."+T.params.slidePrevClass);l.length>0&&T.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){T.params.lazyLoading&&(T.params.lazyLoadingOnTransitionStart||!T.params.lazyLoadingOnTransitionStart&&!T.lazy.initialImageLoaded)&&T.lazy.load()},onTransitionEnd:function(){T.params.lazyLoading&&!T.params.lazyLoadingOnTransitionStart&&T.lazy.load()}},T.scrollbar={isTouched:!1,setDragPosition:function(e){var a=T.scrollbar,t=T.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[T.isHorizontal()?"left":"top"]-a.dragSize/2,r=-T.minTranslate()*a.moveDivider,i=-T.maxTranslate()*a.moveDivider;si&&(s=i),s=-s/a.moveDivider,T.updateProgress(s),T.setWrapperTranslate(s,!0)},dragStart:function(e){var a=T.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),T.params.scrollbarHide&&a.track.css("opacity",1),T.wrapper.transition(100),a.drag.transition(100),T.emit("onScrollbarDragStart",T)},dragMove:function(e){var a=T.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),T.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),T.emit("onScrollbarDragMove",T))},dragEnd:function(e){var a=T.scrollbar;a.isTouched&&(a.isTouched=!1,T.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),T.emit("onScrollbarDragEnd",T),T.params.scrollbarSnapOnRelease&&T.slideReset())},draggableEvents:function(){return T.params.simulateTouch!==!1||T.support.touch?T.touchEvents:T.touchEventsDesktop}(),enableDraggable:function(){var e=T.scrollbar,t=T.support.touch?e.track:document;a(e.track).on(e.draggableEvents.start,e.dragStart),a(t).on(e.draggableEvents.move,e.dragMove),a(t).on(e.draggableEvents.end,e.dragEnd)},disableDraggable:function(){var e=T.scrollbar,t=T.support.touch?e.track:document;a(e.track).off(e.draggableEvents.start,e.dragStart),a(t).off(e.draggableEvents.move,e.dragMove),a(t).off(e.draggableEvents.end,e.dragEnd)},set:function(){if(T.params.scrollbar){var e=T.scrollbar;e.track=a(T.params.scrollbar),T.params.uniqueNavElements&&"string"==typeof T.params.scrollbar&&e.track.length>1&&1===T.container.find(T.params.scrollbar).length&&(e.track=T.container.find(T.params.scrollbar)),e.drag=e.track.find(".swiper-scrollbar-drag"),0===e.drag.length&&(e.drag=a('
'),e.track.append(e.drag)),e.drag[0].style.width="",e.drag[0].style.height="",e.trackSize=T.isHorizontal()?e.track[0].offsetWidth:e.track[0].offsetHeight,e.divider=T.size/T.virtualSize,e.moveDivider=e.divider*(e.trackSize/T.size),e.dragSize=e.trackSize*e.divider,T.isHorizontal()?e.drag[0].style.width=e.dragSize+"px":e.drag[0].style.height=e.dragSize+"px",e.divider>=1?e.track[0].style.display="none":e.track[0].style.display="",T.params.scrollbarHide&&(e.track[0].style.opacity=0)}},setTranslate:function(){if(T.params.scrollbar){var e,a=T.scrollbar,t=(T.translate||0,a.dragSize);e=(a.trackSize-a.dragSize)*T.progress,T.rtl&&T.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),T.isHorizontal()?(T.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(T.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),T.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){T.params.scrollbar&&T.scrollbar.drag.transition(e)}},T.controller={LinearSpline:function(e,a){this.x=e,this.y=a,this.lastIndex=e.length-1;var t,s;this.x.length;this.interpolate=function(e){return e?(s=r(this.x,e),t=s-1,(e-this.x[t])*(this.y[s]-this.y[t])/(this.x[s]-this.x[t])+this.y[t]):0};var r=function(){var e,a,t;return function(s,r){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=r?a=t:e=t;return e}}()},getInterpolateFunction:function(e){T.controller.spline||(T.controller.spline=T.params.loop?new T.controller.LinearSpline(T.slidesGrid,e.slidesGrid):new T.controller.LinearSpline(T.snapGrid,e.snapGrid))},setTranslate:function(e,a){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-T.translate:T.translate,"slide"===T.params.controlBy&&(T.controller.getInterpolateFunction(a),i=-T.controller.spline.interpolate(-e)),i&&"container"!==T.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(T.maxTranslate()-T.minTranslate()),i=(e-T.minTranslate())*r+a.minTranslate()),T.params.controlInverse&&(i=a.maxTranslate()-i),a.updateProgress(i),a.setWrapperTranslate(i,!1,T),a.updateActiveIndex()}var r,i,n=T.params.control;if(T.isArray(n))for(var o=0;o-1?"DOMMouseScroll":p()?"wheel":"mousewheel"),T.disableMousewheelControl=function(){if(!T.mousewheel.event)return!1;var e=T.container;return"container"!==T.params.mousewheelEventsTarged&&(e=a(T.params.mousewheelEventsTarged)),e.off(T.mousewheel.event,d),!0},T.enableMousewheelControl=function(){if(!T.mousewheel.event)return!1;var e=T.container;return"container"!==T.params.mousewheelEventsTarged&&(e=a(T.params.mousewheelEventsTarged)),e.on(T.mousewheel.event,d),!0},T.parallax={setTranslate:function(){T.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,T.progress)}),T.slides.each(function(){var e=a(this);e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var a=Math.min(Math.max(e[0].progress,-1),1);m(this,a)})})},setTransition:function(e){"undefined"==typeof e&&(e=T.params.speed),T.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=a(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),t.transition(s)})}},T.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:T.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY,i=Math.sqrt(Math.pow(s-a,2)+Math.pow(r-t,2));return i},onGestureStart:function(e){var t=T.zoom;if(!T.support.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(e)}return t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=a(this),0===t.gesture.slide.length&&(t.gesture.slide=T.slides.eq(T.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+T.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||T.params.zoomMax,0!==t.gesture.imageWrap.length)?(t.gesture.image.transition(0),void(t.isScaling=!0)):void(t.gesture.image=void 0)},onGestureChange:function(e){var a=T.zoom;if(!T.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(T.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scalea.image.touchesStart.x)return void(a.image.isTouched=!1);if(!T.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.ya.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentXa.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentYa.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,r=300,i=t.velocity.x*s,n=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,r);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,u=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-u/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(e,t){var s=e.zoom;if(s.gesture.slide||(s.gesture.slide=e.clickedSlide?a(e.clickedSlide):e.slides.eq(e.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+e.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var r,i,n,o,l,p,d,u,m,c,g,h,f,v,w,y,x,T;"undefined"==typeof s.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=s.image.touchesStart.x,i=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||e.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-r,p=o+T/2-i,m=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,g=m*s.scale,h=c*s.scale,f=Math.min(x/2-g/2,0),v=Math.min(T/2-h/2,0),w=-f,y=-v,d=l*s.scale,u=p*s.scale,dw&&(d=w),uy&&(u=y)):(d=0,u=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+u+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(e){var t=e?"off":"on";if(T.params.zoom){var s=(T.slides,!("touchstart"!==T.touchEvents.start||!T.support.passiveListener||!T.params.passiveListeners)&&{passive:!0,capture:!1});T.support.gestures?(T.slides[t]("gesturestart",T.zoom.onGestureStart,s),T.slides[t]("gesturechange",T.zoom.onGestureChange,s),T.slides[t]("gestureend",T.zoom.onGestureEnd,s)):"touchstart"===T.touchEvents.start&&(T.slides[t](T.touchEvents.start,T.zoom.onGestureStart,s),T.slides[t](T.touchEvents.move,T.zoom.onGestureChange,s),T.slides[t](T.touchEvents.end,T.zoom.onGestureEnd,s)),T[t]("touchStart",T.zoom.onTouchStart),T.slides.each(function(e,s){a(s).find("."+T.params.zoomContainerClass).length>0&&a(s)[t](T.touchEvents.move,T.zoom.onTouchMove)}),T[t]("touchEnd",T.zoom.onTouchEnd),T[t]("transitionEnd",T.zoom.onTransitionEnd),T.params.zoomToggle&&T.on("doubleTap",T.zoom.toggleZoom)}},init:function(){T.zoom.attachEvents()},destroy:function(){T.zoom.attachEvents(!0)}},T._plugins=[];for(var A in T.plugins){var O=T.plugins[A](T,T.params[A]);O&&T._plugins.push(O)}return T.callPlugins=function(e){for(var a=0;a'),notify:function(e){var a=T.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){T.params.nextButton&&T.nextButton&&T.nextButton.length>0&&(T.a11y.makeFocusable(T.nextButton),T.a11y.addRole(T.nextButton,"button"),T.a11y.addLabel(T.nextButton,T.params.nextSlideMessage)),T.params.prevButton&&T.prevButton&&T.prevButton.length>0&&(T.a11y.makeFocusable(T.prevButton),T.a11y.addRole(T.prevButton,"button"),T.a11y.addLabel(T.prevButton,T.params.prevSlideMessage)),a(T.container).append(T.a11y.liveRegion)},initPagination:function(){T.params.pagination&&T.params.paginationClickable&&T.bullets&&T.bullets.length&&T.bullets.each(function(){var e=a(this);T.a11y.makeFocusable(e),T.a11y.addRole(e,"button"),T.a11y.addLabel(e,T.params.paginationBulletMessage.replace(/{{index}}/,e.index()+1))})},destroy:function(){T.a11y.liveRegion&&T.a11y.liveRegion.length>0&&T.a11y.liveRegion.remove()}},T.init=function(){T.params.loop&&T.createLoop(),T.updateContainerSize(),T.updateSlidesSize(),T.updatePagination(),T.params.scrollbar&&T.scrollbar&&(T.scrollbar.set(),T.params.scrollbarDraggable&&T.scrollbar.enableDraggable()),"slide"!==T.params.effect&&T.effects[T.params.effect]&&(T.params.loop||T.updateProgress(),T.effects[T.params.effect].setTranslate()),T.params.loop?T.slideTo(T.params.initialSlide+T.loopedSlides,0,T.params.runCallbacksOnInit):(T.slideTo(T.params.initialSlide,0,T.params.runCallbacksOnInit),0===T.params.initialSlide&&(T.parallax&&T.params.parallax&&T.parallax.setTranslate(),T.lazy&&T.params.lazyLoading&&(T.lazy.load(),T.lazy.initialImageLoaded=!0))),T.attachEvents(),T.params.observer&&T.support.observer&&T.initObservers(),T.params.preloadImages&&!T.params.lazyLoading&&T.preloadImages(),T.params.zoom&&T.zoom&&T.zoom.init(),T.params.autoplay&&T.startAutoplay(),T.params.keyboardControl&&T.enableKeyboardControl&&T.enableKeyboardControl(),T.params.mousewheelControl&&T.enableMousewheelControl&&T.enableMousewheelControl(),T.params.hashnavReplaceState&&(T.params.replaceState=T.params.hashnavReplaceState),T.params.history&&T.history&&T.history.init(),T.params.hashnav&&T.hashnav&&T.hashnav.init(),T.params.a11y&&T.a11y&&T.a11y.init(),T.emit("onInit",T)},T.cleanupStyles=function(){T.container.removeClass(T.classNames.join(" ")).removeAttr("style"),T.wrapper.removeAttr("style"),T.slides&&T.slides.length&&T.slides.removeClass([T.params.slideVisibleClass,T.params.slideActiveClass,T.params.slideNextClass,T.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),T.paginationContainer&&T.paginationContainer.length&&T.paginationContainer.removeClass(T.params.paginationHiddenClass),T.bullets&&T.bullets.length&&T.bullets.removeClass(T.params.bulletActiveClass),T.params.prevButton&&a(T.params.prevButton).removeClass(T.params.buttonDisabledClass),T.params.nextButton&&a(T.params.nextButton).removeClass(T.params.buttonDisabledClass),T.params.scrollbar&&T.scrollbar&&(T.scrollbar.track&&T.scrollbar.track.length&&T.scrollbar.track.removeAttr("style"),T.scrollbar.drag&&T.scrollbar.drag.length&&T.scrollbar.drag.removeAttr("style"))},T.destroy=function(e,a){T.detachEvents(),T.stopAutoplay(),T.params.scrollbar&&T.scrollbar&&T.params.scrollbarDraggable&&T.scrollbar.disableDraggable(),T.params.loop&&T.destroyLoop(),a&&T.cleanupStyles(),T.disconnectObservers(),T.params.zoom&&T.zoom&&T.zoom.destroy(),T.params.keyboardControl&&T.disableKeyboardControl&&T.disableKeyboardControl(),T.params.mousewheelControl&&T.disableMousewheelControl&&T.disableMousewheelControl(),T.params.a11y&&T.a11y&&T.a11y.destroy(),T.params.history&&!T.params.replaceState&&window.removeEventListener("popstate",T.history.setHistoryPopState),T.params.hashnav&&T.hashnav&&T.hashnav.destroy(),T.emit("onDestroy"),e!==!1&&(T=null)},T.init(),T}};t.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||r||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=t}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper}); !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("
");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()}); (function(){ "use strict"; window.trx_addons_get_cookie=function(name){ var defa=arguments[1]!=undefined ? arguments[1]:null; var start=document.cookie.indexOf(name + '='); var len=start + name.length + 1; if((!start)&&(name!=document.cookie.substring(0, name.length))){ return defa; } if(start==-1) return defa; var end=document.cookie.indexOf(';', len); if(end==-1) end=document.cookie.length; return unescape(document.cookie.substring(len, end)); }; window.trx_addons_set_cookie=function(name, value, expires, path, domain, secure){ var expires=arguments[2]!=undefined ? arguments[2]:0; var path=arguments[3]!=undefined ? arguments[3]:'/'; var domain=arguments[4]!=undefined ? arguments[4]:''; var secure=arguments[5]!=undefined ? arguments[5]:''; var today=new Date(); today.setTime(today.getTime()); if(expires){ expires=expires * 1000 * 60 * 60 * 24; } var expires_date=new Date(today.getTime() + (expires)); document.cookie=name + '=' + escape(value) + ((expires) ? ';expires=' + expires_date.toGMTString():'') + ((path) ? ';path=' + path:'') + ((domain) ? ';domain=' + domain:'') + ((secure) ? ';secure':''); }; window.trx_addons_del_cookie=function(name, path, domain){ var path=arguments[1]!=undefined ? arguments[1]:'/'; var domain=arguments[2]!=undefined ? arguments[2]:''; if(trx_addons_get_cookie(name)) document.cookie=name + '=' + ((path) ? ';path=' + path:'') + ((domain) ? ';domain=' + domain:'') + ';expires=Thu, 01-Jan-1970 00:00:01 GMT'; }; window.trx_addons_clear_listbox=function(box){ for (var i=box.options.length-1; i >=0; i--) box.options[i]=null; }; window.trx_addons_add_listbox_item=function(box, val, text){ var item=new Option(); item.value=val; item.text=text; box.options.add(item); }; window.trx_addons_del_listbox_item_by_value=function(box, val){ for (var i=0; i < box.options.length; i++){ if(box.options[i].value==val){ box.options[i]=null; break; }} }; window.trx_addons_del_listbox_item_by_text=function(box, txt){ for (var i=0; i < box.options.length; i++){ if(box.options[i].text==txt){ box.options[i]=null; break; }} }; window.trx_addons_find_listbox_item_by_value=function(box, val){ var idx=-1; for (var i=0; i < box.options.length; i++){ if(box.options[i].value==val){ idx=i; break; }} return idx; }; window.trx_addons_find_listbox_item_by_text=function(box, txt){ var idx=-1; for (var i=0; i < box.options.length; i++){ if(box.options[i].text==txt){ idx=i; break; }} return idx; }; window.trx_addons_select_listbox_item_by_value=function(box, val){ for (var i=0; i < box.options.length; i++){ box.options[i].selected=(val==box.options[i].value); }}; window.trx_addons_select_listbox_item_by_text=function(box, txt){ for (var i=0; i < box.options.length; i++){ box.options[i].selected=(txt==box.options[i].text); }}; window.trx_addons_get_listbox_values=function(box){ var delim=arguments[1] ? arguments[1]:','; var str=''; for (var i=0; i < box.options.length; i++){ str +=(str ? delim:'') + box.options[i].value; } return str; }; window.trx_addons_get_listbox_texts=function(box){ var delim=arguments[1] ? arguments[1]:','; var str=''; for (var i=0; i < box.options.length; i++){ str +=(str ? delim:'') + box.options[i].text; } return str; }; window.trx_addons_sort_listbox=function(box){ var temp_opts=new Array(); var temp=new Option(); for(var i=0; i temp_opts[y].text){ temp=temp_opts[x]; temp_opts[x]=temp_opts[y]; temp_opts[y]=temp; }} } for(var i=0; i 0&&val.length < opt.rules[i].min_length.value){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

' + (typeof(opt.rules[i].min_length.message)!='undefined' ? opt.rules[i].min_length.message:opt.error_message_text) + '

'; error=true; }} if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].max_length)=='object'){ if(opt.rules[i].max_length.value > 0&&val.length > opt.rules[i].max_length.value){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

' + (typeof(opt.rules[i].max_length.message)!='undefined' ? opt.rules[i].max_length.message:opt.error_message_text) + '

'; error=true; }} if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].mask)=='object'){ if(opt.rules[i].mask.value!=''){ var regexp=new RegExp(opt.rules[i].mask.value); if(!regexp.test(val)){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

' + (typeof(opt.rules[i].mask.message)!='undefined' ? opt.rules[i].mask.message:opt.error_message_text) + '

'; error=true; }} } if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].state)=='object'){ if(opt.rules[i].state.value=='checked'&&!jQuery(this).get(0).checked){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

' + (typeof(opt.rules[i].state.message)!='undefined' ? opt.rules[i].state.message:opt.error_message_text) + '

'; error=true; }} if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].equal_to)=='object'){ if(opt.rules[i].equal_to.value!=''&&val!=jQuery(jQuery(this).get(0).form[opt.rules[i].equal_to.value]).val()){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

' + (typeof(opt.rules[i].equal_to.message)!='undefined' ? opt.rules[i].equal_to.message:opt.error_message_text) + '

'; error=true; }} if(opt.error_fields_class!='') jQuery(this).toggleClass(opt.error_fields_class, error); }} });if(error_msg!=''&&opt.error_message_show){ var error_message_box=form.find(".trx_addons_message_box"); if(error_message_box.length==0) error_message_box=form.parent().find(".trx_addons_message_box"); if(error_message_box.length==0){ form.append('
'); error_message_box=form.find(".trx_addons_message_box"); } if(opt.error_message_class) error_message_box.toggleClass(opt.error_message_class, true); error_message_box.html(error_msg).fadeIn(); setTimeout(function(){ error_message_box.fadeOut(); }, opt.error_message_time); } return error_msg!=''; }; window.trx_addons_refresh_list=function(parent_type, parent_val, list_fld, list_lbl, list_not_selected){ var list_val=list_fld.val(); if(list_lbl.find('.trx_addons_refresh').length==0) list_lbl.append(''); var data={ action: 'trx_addons_refresh_list', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], parent_type: parent_type, parent_value: parent_val, list_not_selected: list_not_selected===true||list_fld.data('not-selected')===true||list_fld.parents('.vc_edit-form-tab').length > 0||list_fld.parents('.siteorigin-widget-field').length > 0||list_fld.parents('[class*="widget_field_type_"]').length > 0||list_fld.parents('.widget-liquid-right').length > 0||list_fld.parents('.widgets-holder-wrap').length > 0||list_fld.parents('.customize-control-widget_form').length > 0 }; jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], data, function(response){ var rez={}; try { rez=JSON.parse(response); } catch (e){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] }; console.log(response); } if(rez.error===''){ var opt_list=''; var list_type=list_fld.prop('tagName').toLowerCase(); var list_name=list_type=='select' ? list_fld.attr('name'):list_fld.data('field_name'); for (var i in rez.data){ if(list_type!='select'&&rez.data[i]['key']==0) continue; opt_list +=list_type=='select' ? '':''; } list_fld.html(opt_list); if(list_type=='select'&&list_fld.find('option:selected').length==0&&list_fld.find('option').length > 0) list_fld.find('option').get(0).selected=true; list_lbl.find('span.trx_addons_refresh').remove(); list_fld.trigger('change'); }});return false; }; window.trx_addons_document_animate_to=function(id, callback){ var oft = !isNaN(id) ? Number(id):0; if(isNaN(id)){ if(id.indexOf('#')==-1) id='#' + id; var obj=jQuery(id).eq(0); if(obj.length==0) return; oft=obj.offset().top; } var st=jQuery(window).scrollTop(); var oft2=Math.max(0, oft - trx_addons_fixed_rows_height()); var speed=Math.min(1200, Math.max(300, Math.round(Math.abs(oft2-st) / jQuery(window).height() * 300))); if(true||st==0){ setTimeout(function(){ if(isNaN(id)) oft=obj.offset().top; oft2=Math.max(0, oft - trx_addons_fixed_rows_height()); jQuery('body,html').stop(true).animate({scrollTop: oft2}, Math.floor(speed/2), 'linear', callback); }, Math.floor(speed/2)); } jQuery('body,html').stop(true).animate({scrollTop: oft2}, speed, 'linear', callback); }; window.trx_addons_fixed_rows_height=function(){ var with_admin_bar=arguments.length>0 ? arguments[0]:true; var with_fixed_rows=arguments.length>1 ? arguments[1]:true; var oft=0; if(with_admin_bar){ var admin_bar=jQuery('#wpadminbar'); oft +=admin_bar.length > 0&&admin_bar.css('display')!='none'&&admin_bar.css('position')=='fixed' ? admin_bar.height():0; } if(with_fixed_rows){ jQuery('.sc_layouts_row_fixed_on').each(function(){ if(jQuery(this).css('position')=='fixed') oft +=jQuery(this).height(); });} return oft; }; window.trx_addons_document_set_location=function(curLoc){ if(history.pushState===undefined||navigator.userAgent.match(/MSIE\s[6-9]/i)!=null) return; try { history.pushState(null, null, curLoc); return; } catch(e){} location.href=curLoc; }; window.trx_addons_add_to_url=function(loc, prm){ var ignore_empty=arguments[2]!==undefined ? arguments[2]:true; var q=loc.indexOf('?'); var attr={}; if(q > 0){ var qq=loc.substr(q+1).split('&'); var parts=''; for (var i=0; i < qq.length; i++){ var parts=qq[i].split('='); attr[parts[0]]=parts.length>1 ? parts[1]:''; }} for (var p in prm){ attr[p]=prm[p]; } loc=(q > 0 ? loc.substr(0, q):loc) + '?'; var i=0; for (p in attr){ if(ignore_empty&&attr[p]=='') continue; loc +=(i++ > 0 ? '&':'') + p + '=' + attr[p]; } return loc; }; window.trx_addons_is_local_link=function(url){ var rez=url!==undefined; if(rez){ var url_pos=url.indexOf('#'); if(url_pos==0&&url.length==1) rez=false; else { if(url_pos < 0) url_pos=url.length; var loc=window.location.href; var loc_pos=loc.indexOf('#'); if(loc_pos > 0) loc=loc.substring(0, loc_pos); rez=url_pos==0; if(!rez) rez=loc==url.substring(0, url_pos); }} return rez; }; window.trx_addons_browser_is_mobile=function(){ var check=false; (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check=true})(navigator.userAgent||navigator.vendor||window.opera); return check; }; window.trx_addons_browser_is_ios=function(){ return navigator.userAgent.match(/iPad|iPhone|iPod/i)!=null||navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)?true:false; }; window.trx_addons_is_retina=function(){ var mediaQuery='(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)'; return (window.devicePixelRatio > 1)||(window.matchMedia&&window.matchMedia(mediaQuery).matches); }; window.trx_addons_get_file_name=function(path){ path=path.replace(/\\/g, '/'); var pos=path.lastIndexOf('/'); if(pos >=0) path=path.substr(pos+1); return path; }; window.trx_addons_get_file_ext=function(path){ var pos=path.lastIndexOf('.'); path=pos >=0 ? path.substr(pos+1):''; return path; }; window.trx_addons_check_images_complete=function(cont){ var complete=true; cont.find('img').each(function(){ if(!complete) return; if(!jQuery(this).get(0).complete) complete=false; });return complete; }; window.trx_addons_round_number=function(num){ var precision=arguments[1]!==undefined ? arguments[1]:0; var p=Math.pow(10, precision); return Math.round(num*p)/p; }; Number.prototype.formatMoney=function(c, d, t){ var n=this, c=c==undefined ? 2:(isNaN(c=Math.abs(c)) ? 2:c), d=d==undefined ? ".":d, t=t==undefined ? ",":t, s=n < 0 ? "-":"", i=String(parseInt(n=Math.abs(Number(n)||0).toFixed(c))), j=(j=i.length) > 3 ? j % 3:0; return s + (j ? i.substr(0, j) + t:"") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2):""); }; window.trx_addons_replicate=function(str, num){ var rez=''; for (var i=0; i < num; i++){ rez +=str; } return rez; }; window.trx_addons_get_icon_class=function(classes){ var classes=classes.split(' '); var icon=''; for (var i=0; i < classes.length; i++){ if(classes[i].indexOf('icon-') >=0){ icon=classes[i]; break; }} return icon; }; window.trx_addons_chg_icon_class=function(classes, icon){ var chg=false; classes=classes.split(' '); for (var i=0; i < classes.length; i++){ if(classes[i].indexOf('icon-') >=0){ classes[i]=icon; chg=true; break; }} if(!chg){ if(classes.length==1&&classes[0]=='') classes[0]=icon; else classes.push(icon); } return classes.join(' '); }; window.trx_addons_hex2rgb=function(hex){ hex=parseInt(((hex.indexOf('#') > -1) ? hex.substring(1):hex), 16); return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};}; window.trx_addons_hex2rgba=function(hex, alpha){ var rgb=trx_addons_hex2rgb(hex); return 'rgba('+rgb.r+','+rgb.g+','+rgb.b+','+alpha+')'; }; window.trx_addons_rgb2hex=function(color){ var aRGB; color=color.replace(/\s/g,"").toLowerCase(); if(color=='rgba(0,0,0,0)'||color=='rgba(0%,0%,0%,0%)') color='transparent'; if(color.indexOf('rgba(')==0) aRGB=color.match(/^rgba\((\d{1,3}[%]?),(\d{1,3}[%]?),(\d{1,3}[%]?),(\d{1,3}[%]?)\)$/i); else aRGB=color.match(/^rgb\((\d{1,3}[%]?),(\d{1,3}[%]?),(\d{1,3}[%]?)\)$/i); if(aRGB){ color=''; for (var i=1; i <=3; i++) color +=Math.round((aRGB[i][aRGB[i].length-1]=="%"?2.55:1)*parseInt(aRGB[i])).toString(16).replace(/^(.)$/,'0$1'); } else color=color.replace(/^#?([\da-f])([\da-f])([\da-f])$/i, '$1$1$2$2$3$3'); return (color.substr(0,1)!='#' ? '#':'') + color; }; window.trx_addons_components2hex=function(r,g,b){ return '#'+ Number(r).toString(16).toUpperCase().replace(/^(.)$/,'0$1') + Number(g).toString(16).toUpperCase().replace(/^(.)$/,'0$1') + Number(b).toString(16).toUpperCase().replace(/^(.)$/,'0$1'); }; window.trx_addons_rgb2components=function(color){ color=trx_addons_rgb2hex(color); var matches=color.match(/^#?([\dabcdef]{2})([\dabcdef]{2})([\dabcdef]{2})$/i); if(!matches) return false; for (var i=1, rgb=new Array(3); i <=3; i++) rgb[i-1]=parseInt(matches[i],16); return rgb; }; window.trx_addons_hex2hsb=function(hex){ var h=arguments[1]!==undefined ? arguments[1]:0; var s=arguments[2]!==undefined ? arguments[2]:0; var b=arguments[3]!==undefined ? arguments[3]:0; var hsb=trx_addons_rgb2hsb(trx_addons_hex2rgb(hex)); hsb.h=Math.min(359, hsb.h + h); hsb.s=Math.min(100, hsb.s + s); hsb.b=Math.min(100, hsb.b + b); return hsb; }; window.trx_addons_hsb2hex=function(hsb){ var rgb=trx_addons_hsb2rgb(hsb); return trx_addons_components2hex(rgb.r, rgb.g, rgb.b); }; window.trx_addons_rgb2hsb=function(rgb){ var hsb={}; hsb.b=Math.max(Math.max(rgb.r,rgb.g),rgb.b); hsb.s=(hsb.b <=0) ? 0:Math.round(100*(hsb.b - Math.min(Math.min(rgb.r,rgb.g),rgb.b))/hsb.b); hsb.b=Math.round((hsb.b /255)*100); if((rgb.r==rgb.g)&&(rgb.g==rgb.b)) hsb.h=0; else if(rgb.r>=rgb.g&&rgb.g>=rgb.b) hsb.h=60*(rgb.g-rgb.b)/(rgb.r-rgb.b); else if(rgb.g>=rgb.r&&rgb.r>=rgb.b) hsb.h=60 + 60*(rgb.g-rgb.r)/(rgb.g-rgb.b); else if(rgb.g>=rgb.b&&rgb.b>=rgb.r) hsb.h=120 + 60*(rgb.b-rgb.r)/(rgb.g-rgb.r); else if(rgb.b>=rgb.g&&rgb.g>=rgb.r) hsb.h=180 + 60*(rgb.b-rgb.g)/(rgb.b-rgb.r); else if(rgb.b>=rgb.r&&rgb.r>=rgb.g) hsb.h=240 + 60*(rgb.r-rgb.g)/(rgb.b-rgb.g); else if(rgb.r>=rgb.b&&rgb.b>=rgb.g) hsb.h=300 + 60*(rgb.r-rgb.b)/(rgb.r-rgb.g); else hsb.h=0; hsb.h=Math.round(hsb.h); return hsb; }; window.trx_addons_hsb2rgb=function(hsb){ var rgb={}; var h=Math.round(hsb.h); var s=Math.round(hsb.s*255/100); var v=Math.round(hsb.b*255/100); if(s==0){ rgb.r=rgb.g=rgb.b=v; }else{ var t1=v; var t2=(255-s)*v/255; var t3=(t1-t2)*(h%60)/60; if(h==360) h=0; if(h<60){ rgb.r=t1; rgb.b=t2; rgb.g=t2+t3; }else if(h<120){ rgb.g=t1; rgb.b=t2; rgb.r=t1-t3; }else if(h<180){ rgb.g=t1; rgb.r=t2; rgb.b=t2+t3; }else if(h<240){ rgb.b=t1; rgb.r=t2; rgb.g=t1-t3; }else if(h<300){ rgb.b=t1; rgb.g=t2; rgb.r=t2+t3; }else if(h<360){ rgb.r=t1; rgb.g=t2; rgb.b=t1-t3; }else{ rgb.r=0; rgb.g=0; rgb.b=0; }} return { r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b) };}; window.trx_addons_color_picker=function(){ var id=arguments[0]!==undefined ? arguments[0]:"iColorPicker"+Math.round(Math.random()*1000); var colors=arguments[1]!==undefined ? arguments[1]:'#f00,#ff0,#0f0,#0ff,#00f,#f0f,#fff,#ebebeb,#e1e1e1,#d7d7d7,#cccccc,#c2c2c2,#b7b7b7,#acacac,#a0a0a0,#959595,' +'#ee1d24,#fff100,#00a650,#00aeef,#2f3192,#ed008c,#898989,#7d7d7d,#707070,#626262,#555,#464646,#363636,#262626,#111,#000,' +'#f7977a,#fbad82,#fdc68c,#fff799,#c6df9c,#a4d49d,#81ca9d,#7bcdc9,#6ccff7,#7ca6d8,#8293ca,#8881be,#a286bd,#bc8cbf,#f49bc1,#f5999d,' +'#f16c4d,#f68e54,#fbaf5a,#fff467,#acd372,#7dc473,#39b778,#16bcb4,#00bff3,#438ccb,#5573b7,#5e5ca7,#855fa8,#a763a9,#ef6ea8,#f16d7e,' +'#ee1d24,#f16522,#f7941d,#fff100,#8fc63d,#37b44a,#00a650,#00a99e,#00aeef,#0072bc,#0054a5,#2f3192,#652c91,#91278f,#ed008c,#ee105a,' +'#9d0a0f,#a1410d,#a36209,#aba000,#588528,#197b30,#007236,#00736a,#0076a4,#004a80,#003370,#1d1363,#450e61,#62055f,#9e005c,#9d0039,' +'#790000,#7b3000,#7c4900,#827a00,#3e6617,#045f20,#005824,#005951,#005b7e,#003562,#002056,#0c004b,#30004a,#4b0048,#7a0045,#7a0026'; var colorsList=colors.split(','); var tbl=''; for (var i=0; i < colorsList.length; i++){ if(i%16==0) tbl +=(i>0 ? '':'') + ''; tbl +=''; } tbl +='' + '' + '' + '' + '
 
' + '' + '' + '' + '' + '
'; jQuery(document.createElement("div")) .attr("id", id) .css('display','none') .html(tbl) .appendTo("body") .addClass("iColorPickerTable") .on('mouseover', 'thead td', function(){ var aaa=trx_addons_rgb2hex(jQuery(this).css('background-color')); jQuery('#'+id+'_colorPreview').css('background',aaa); jQuery('#'+id+'_colorPreview input').val(aaa); }) .on('keypress', '#'+id+'_colorPreview input', function(key){ var aaa=jQuery(this).val(); if(key.which===13&&(aaa.length===4||aaa.length===7)){ var fld=jQuery('#'+id).data('field'); var func=jQuery('#'+id).data('func'); if(func!=null&&func!='undefined'){ func(fld, aaa); }else{ fld.val(aaa).css('backgroundColor', aaa).trigger('change'); } jQuery('#'+id+'_Bg').fadeOut(500); jQuery('#'+id).fadeOut(500); key.preventDefault(); return false; }}) .on('change', '#'+id+'_colorPreview input', function(key){ var aaa=jQuery(this).val(); if(aaa.substr(0,1)==='#'&&(aaa.length===4||aaa.length===7)){ jQuery('#'+id+'_colorPreview').css('background',aaa); }}) .on('click', 'thead td', function(e){ var fld=jQuery('#'+id).data('field'); var func=jQuery('#'+id).data('func'); var aaa=trx_addons_rgb2hex(jQuery(this).css('background-color')); if(func!=null&&func!='undefined'){ func(fld, aaa); }else{ fld.val(aaa).css('backgroundColor', aaa).trigger('change'); } jQuery('#'+id+'_Bg').fadeOut(500); jQuery('#'+id).fadeOut(500); e.preventDefault(); return false; }) .on('click', 'tbody .iColorPicker_moreColors', function(e){ var thead=jQuery(this).parents('table').find('thead'); var out=''; if(thead.hasClass('more_colors')){ for (var i=0; i < colorsList.length; i++){ if(i%16==0) out +=(i>0 ? '':'') + ''; out +=' '; } thead.removeClass('more_colors').empty().html(out+''); jQuery('#'+id+'_colorPreview').attr('colspan', 8); jQuery('#'+id+'_colorOriginal').attr('colspan', 8); }else{ var rgb=[0,0,0], i=0, j=-1; while (rgb[0]<0xF||rgb[1]<0xF||rgb[2]<0xF){ if(i%18==0) out +=(i>0 ? '':'') + ''; i++; out +=' '; rgb[2]+=3; if(rgb[2]>0xF){ rgb[1]+=3; if(rgb[1]>(j===0 ? 6:0xF)){ rgb[0]+=3; if(rgb[0]>0xF){ if(j===0){ j=1; rgb[0]=0; rgb[1]=9; rgb[2]=0; }else{ break; }}else{ rgb[1]=(j < 1 ? 0:9); rgb[2]=0; }}else{ rgb[2]=0; }} } thead.addClass('more_colors').empty().html(out+' '); jQuery('#'+id+'_colorPreview').attr('colspan', 9); jQuery('#'+id+'_colorOriginal').attr('colspan', 9); } jQuery('#'+id+' table.colorPickerTable thead td') .css({ 'width':'12px', 'height':'14px', 'border':'1px solid #000', 'cursor':'pointer' });e.preventDefault(); return false; });jQuery(document.createElement("div")) .attr("id", id+"_Bg") .on('click', function(e){ jQuery("#"+id+"_Bg").fadeOut(500); jQuery("#"+id).fadeOut(500); e.preventDefault(); return false; }) .appendTo("body"); jQuery('#'+id+' table.colorPickerTable thead td') .css({ 'width':'12px', 'height':'14px', 'border':'1px solid #000', 'cursor':'pointer' });jQuery('#'+id+' table.colorPickerTable') .css({'border-collapse':'collapse'});jQuery('#'+id) .css({ 'border':'1px solid #ccc', 'background':'#333', 'padding':'5px', 'color':'#fff' });jQuery('#'+id+'_colorPreview') .css({'height':'50px'});return id; }; window.trx_addons_color_picker_show=function(id, fld, func){ if(id===null||id===''){ id=jQuery('.iColorPickerTable').attr('id'); } var eICP=fld.offset(); var w=jQuery('#'+id).width(); var h=jQuery('#'+id).height(); var l=eICP.left + w < jQuery(window).width()-10 ? eICP.left:jQuery(window).width()-10 - w; var t=eICP.top + fld.outerHeight() + h < jQuery(document).scrollTop() + jQuery(window).height()-10 ? eICP.top + fld.outerHeight():eICP.top - h - 13; jQuery("#"+id) .data({field: fld, func: func}) .css({ 'top':t+"px", 'left':l+"px", 'position':'absolute', 'z-index':999999 }) .fadeIn(500); jQuery("#"+id+"_Bg") .css({ 'position':'fixed', 'z-index':999998, 'top':0, 'left':0, 'width':'100%', 'height':'100%' }) .fadeIn(500); var def=fld.val().substr(0, 1)=='#' ? fld.val():trx_addons_rgb2hex(fld.css('backgroundColor')); jQuery('#'+id+'_colorPreview input,#'+id+'_colorOriginal input').val(def); jQuery('#'+id+'_colorPreview,#'+id+'_colorOriginal').css('background',def); }; window.trx_addons_serialize=function(mixed_val){ var obj_to_array=arguments.length==1||argument[1]===true; switch(typeof(mixed_val)){ case "number": if(isNaN(mixed_val)||!isFinite(mixed_val)) return false; else return (Math.floor(mixed_val)==mixed_val ? "i":"d") + ":" + mixed_val + ";"; case "string": return "s:" + mixed_val.length + ":\"" + mixed_val + "\";"; case "boolean": return "b:" + (mixed_val ? "1":"0") + ";"; case "object": if(mixed_val==null) return "N;"; else if(mixed_val instanceof Array){ var idxobj={ idx: -1 }; var map=[]; for (var i=0; i < mixed_val.length; i++){ idxobj.idx++; var ser=trx_addons_serialize(mixed_val[i]); if(ser) map.push(trx_addons_serialize(idxobj.idx) + ser); } return "a:" + mixed_val.length + ":{" + map.join("") + "}"; }else{ var class_name=trx_addons_get_class(mixed_val); if(class_name==undefined) return false; var props=new Array(); for (var prop in mixed_val){ var ser=trx_addons_serialize(mixed_val[prop]); if(ser) props.push(trx_addons_serialize(prop) + ser); } if(obj_to_array) return "a:" + props.length + ":{" + props.join("") + "}"; else return "O:" + class_name.length + ":\"" + class_name + "\":" + props.length + ":{" + props.join("") + "}"; } case "undefined": return "N;"; } return false; }; window.trx_addons_get_class=function(obj){ if(obj instanceof Object&&!(obj instanceof Array)&&!(obj instanceof Function)&&obj.constructor){ var arr=obj.constructor.toString().match(/function\s*(\w+)/); if(arr&&arr.length==2) return arr[1]; } return false; };})(); jQuery(document).ready(function(){ "use strict"; var vc_init_counter=0; trx_addons_init_actions(); jQuery(window).on('beforeunload', function(e){ if(jQuery.browser&&!jQuery.browser.safari){ jQuery('#page_preloader').css({display: 'block', opacity: 0}).animate({opacity:0.8}, 300); setTimeout(trx_addons_hide_preloader, 5000); }});function trx_addons_hide_preloader(){ jQuery('#page_preloader').animate({opacity:0}, 800, function(){ jQuery(this).css({display: 'none'}); });} function trx_addons_init_actions(){ if(TRX_ADDONS_STORAGE['vc_edit_mode'] > 0&&jQuery('.vc_empty-placeholder').length==0&&vc_init_counter++ < 30){ setTimeout(trx_addons_init_actions, 200); return; } trx_addons_hide_preloader(); var msg=jQuery('.trx_addons_message_box_system'), msg_delay=5000; if(msg.length > 0){ setTimeout(function(){ msg.fadeIn().delay(msg_delay).fadeOut(); }, 1000); var login=jQuery('.trx_addons_login_link'); if(msg.hasClass('trx_addons_message_box_error')&&login.length > 0){ setTimeout(function(){ login.trigger('click'); }, 2000+msg_delay); }} if(typeof TRX_ADDONS_STORAGE['animate_to_hash']=='undefined'&&!jQuery('body').hasClass('single-product')){ TRX_ADDONS_STORAGE['animate_to_hash']=true; setTimeout(function(){ if(window.mc4wp_forms_config&&window.mc4wp_forms_config.submitted_form&&window.mc4wp_forms_config.submitted_form.element_id){ trx_addons_document_animate_to(window.mc4wp_forms_config.submitted_form.element_id); }else if(location.hash!=''){ var off=jQuery(location.hash).offset().top, scroll=jQuery(window).scrollTop(); if(!isNaN(off)&&off - scroll < 100){ var fixed_height=trx_addons_fixed_rows_height(); if(fixed_height > 0) trx_addons_document_animate_to(jQuery(window).scrollTop() - fixed_height); }} }, 500); } trx_addons_set_cookie('trx_addons_is_retina', trx_addons_is_retina() ? 1:0, 365); jQuery(document).on('action.init_hidden_elements', function(){ trx_addons_ready_actions(); jQuery(window).trigger('scroll'); });trx_addons_ready_actions(); var vc_js=false; jQuery(document).on('vc_js', function(){ if(!vc_js){ vc_js=true; trx_addons_add_handlers(); }});setTimeout(function(){ if(!vc_js){ trx_addons_add_handlers(); }}, 1); function trx_addons_add_handlers(){ trx_addons_resize_actions(); jQuery(window).resize(function(){ trx_addons_resize_actions(); });trx_addons_scroll_actions(); jQuery(window).scroll(function(){ trx_addons_scroll_actions(); });typeof window.wpb_prepare_tab_content=="function"&&typeof window.wpb_prepare_tab_content_old=="undefined"&&(window.wpb_prepare_tab_content_old=window.wpb_prepare_tab_content)&&(window.wpb_prepare_tab_content=function(e, ui){ if(typeof ui.newPanel!=='undefined'&&ui.newPanel.length > 0){ jQuery(document).trigger('action.init_hidden_elements', [ui.newPanel]); }else if(typeof ui.panel!=='undefined'&&ui.panel.length > 0){ jQuery(document).trigger('action.init_hidden_elements', [ui.panel]); } window.wpb_prepare_tab_content_old(e, ui); });typeof window.vc_accordionActivate=="function"&&typeof window.vc_accordionActivate_old=="undefined"&&(window.vc_accordionActivate_old=window.vc_accordionActivate)&&(window.vc_accordionActivate=function(e, ui){ if(typeof ui.newPanel!=='undefined'&&ui.newPanel.length > 0){ jQuery(document).trigger('action.init_hidden_elements', [ui.newPanel]); }else if(typeof ui.panel!=='undefined'&&ui.panel.length > 0){ jQuery(document).trigger('action.init_hidden_elements', [ui.panel]); } window.vc_accordionActivate_old(e, ui); });}} function trx_addons_ready_actions(e, container){ if(container===undefined) container=jQuery('body'); if(TRX_ADDONS_STORAGE['animate_inner_links'] > 0&&!container.hasClass('animate_to_inited')){ container.addClass('animate_to_inited') .on('click', 'a', function(e){ var link_obj=jQuery(this); var link_parent=link_obj.parent(); if(link_parent.parent().hasClass('trx_addons_tabs_titles')||link_parent.hasClass('vc_tta-tab')||link_obj.hasClass('vc_pagination-trigger')||link_obj.hasClass('ui-tabs-anchor')||link_parent.hasClass('vc_tta-panel-title')||link_parent.hasClass('wpb_accordion_header')) return; var href=link_obj.attr('href'); if(href=='#') return; if(trx_addons_is_local_link(href)){ var pos=href.indexOf('#'), offset=0; if(pos >=0){ href=href.substr(pos); if(jQuery(href).length > 0){ trx_addons_document_animate_to(href); e.preventDefault(); return false; }} }});} if(jQuery.ui&&jQuery.ui.tabs&&container.find('.trx_addons_tabs:not(.inited)').length > 0){ container.find('.trx_addons_tabs:not(.inited)').each(function (){ var init=jQuery(this).data('active'); if(isNaN(init)){ init=0; var active=jQuery(this).find('> ul > li[data-active="true"]').eq(0); if(active.length > 0){ init=active.index(); if(isNaN(init)||init < 0) init=0; }}else{ init=Math.max(0, init); } var disabled=[]; jQuery(this).find('> ul > li[data-disabled="true"]').each(function(){ disabled.push(jQuery(this).index()); });jQuery(this).addClass('inited').tabs({ active: init, disabled: disabled, show: { effect: 'fadeIn', duration: 300 }, hide: { effect: 'fadeOut', duration: 300 }, create: function(event, ui){ if(ui.panel.length > 0) jQuery(document).trigger('action.init_hidden_elements', [ui.panel]); }, activate: function(event, ui){ if(ui.newPanel.length > 0) jQuery(document).trigger('action.init_hidden_elements', [ui.newPanel]); }});});} if(jQuery.ui&&jQuery.ui.accordion&&container.find('.trx_addons_accordion:not(.inited)').length > 0){ container.find('.trx_addons_accordion:not(.inited)').each(function (){ var accordion=jQuery(this); var headers=accordion.data('headers'); if(headers===undefined) headers='h5'; var height_style=accordion.data('height-style'); if(height_style===undefined) height_style='content'; var collapsible=accordion.data('collapsible'); if(collapsible===undefined) collapsible=false; var init=accordion.data('active'); var active=false; if(isNaN(init)){ init=0; var active=accordion.find(headers+'[data-active="true"]').eq(0); if(active.length > 0){ while (!active.parent().hasClass('trx_addons_accordion')){ active=active.parent(); } init=active.index(); if(isNaN(init)||init < 0) init=0; }}else{ init=Math.max(0, init); } accordion.addClass('inited').accordion({ active: init, collapsible: collapsible, header: headers, heightStyle: height_style, create: function(event, ui){ if(ui.panel.length > 0){ jQuery(document).trigger('action.init_hidden_elements', [ui.panel]); }else if(active!==false&&active.length > 0){ active.find('>'+headers).trigger('click'); }}, activate: function(event, ui){ if(ui.newPanel.length > 0) jQuery(document).trigger('action.init_hidden_elements', [ui.newPanel]); }});});} var cp=container.find('.trx_addons_color_selector:not(.inited)'), cp_created=false; if(cp.length > 0){ cp.addClass('inited').each(function(){ if(jQuery(this).hasClass('iColorPicker')){ if(!cp_created){ trx_addons_color_picker(); cp_created=true; } trx_addons_change_field_colors(jQuery(this)); jQuery(this) .on('focus', function (e){ trx_addons_color_picker_show(null, jQuery(this), function(fld, clr){ fld.val(clr).trigger('change'); trx_addons_change_field_colors(fld); });}).on('change', function(e){ trx_addons_change_field_colors(jQuery(this)); });}else if(typeof jQuery.fn.wpColorPicker!='undefined'){ jQuery(this).wpColorPicker({ change: function(e, ui){ jQuery(e.target).val(ui.color).trigger('change'); }, clear: function(e){ jQuery(e.target).prev().trigger('change') }, });}});} function trx_addons_change_field_colors(fld){ var clr=fld.val(), hsb=trx_addons_hex2hsb(clr); fld.css({ 'backgroundColor': clr, 'color': hsb['b'] < 70 ? '#fff':'#000' });} if(jQuery.ui&&jQuery.ui.slider&&container.find('.trx_addons_range_slider:not(.inited)').length > 0){ container.find('.trx_addons_range_slider:not(.inited)').each(function (){ var range_slider=jQuery(this); var linked_field=range_slider.data('linked_field'); if(linked_field===undefined) linked_field=range_slider.prev('input[type="hidden"]'); else linked_field=jQuery('#'+linked_field); if(linked_field.length==0) return; var range_slider_cur=range_slider.find('> .trx_addons_range_slider_label_cur'); var range_slider_type=range_slider.data('range'); if(range_slider_type===undefined) range_slider_type='min'; var values=linked_field.val().split(','); var minimum=range_slider.data('min'); if(minimum===undefined) minimum=0; var maximum=range_slider.data('max'); if(maximum===undefined) maximum=0; var step=range_slider.data('step'); if(step===undefined) step=1; var init_obj={ range: range_slider_type, min: minimum, max: maximum, step: step, slide: function(event, ui){ var cur_values=range_slider_type==='min' ? [ui.value]:ui.values; linked_field.val(cur_values.join(',')).trigger('change'); for (var i=0; i < cur_values.length; i++){ range_slider_cur.eq(i) .html(cur_values[i]) .css('left', Math.max(0, Math.min(100, (cur_values[i]-minimum)*100/(maximum-minimum)))+'%'); }}, create: function(event, ui){ for (var i=0; i < values.length; i++){ range_slider_cur.eq(i) .html(values[i]) .css('left', Math.max(0, Math.min(100, (values[i]-minimum)*100/(maximum-minimum)))+'%'); }} }; if(range_slider_type===true) init_obj.values=values; else init_obj.value=values[0]; range_slider.addClass('inited').slider(init_obj); });} if(jQuery.fn&&jQuery.fn.select2){ container.find('.trx_addons_select2:not(.inited)').addClass('inited').select2(); } jQuery(document).trigger('action.init_sliders', [container]); jQuery(document).trigger('action.init_shortcodes', [container]); if(container.find('.trx_addons_video_player.with_cover .video_hover:not(.inited)').length > 0){ container.find('.trx_addons_video_player.with_cover .video_hover:not(.inited)') .addClass('inited') .on('click', function(e){ if(jQuery(this).hasClass('trx_addons_popup_link')) return; jQuery(this).parents('.trx_addons_video_player') .addClass('video_play') .find('.video_embed').html(jQuery(this).data('video')); var slider=jQuery(this).parents('.slider_swiper'); if(slider.length > 0){ var id=slider.attr('id'); TRX_ADDONS_STORAGE['swipers'][id].stopAutoplay(); id=slider.data('controller'); if(id&&TRX_ADDONS_STORAGE['swipers'][id+'_swiper']) TRX_ADDONS_STORAGE['swipers'][id+'_swiper'].stopAutoplay(); } jQuery(document).trigger('action.init_hidden_elements', [jQuery(this).parents('.trx_addons_video_player')]); jQuery(window).trigger('resize'); e.preventDefault(); return false; });} if(TRX_ADDONS_STORAGE['popup_engine']=='pretty'){ container.find("a[href$='jpg']:not(.inited),a[href$='jpeg']:not(.inited),a[href$='png']:not(.inited),a[href$='gif']:not(.inited)").each(function(){ if(!jQuery(this).parent().hasClass('woocommerce-product-gallery__image')) jQuery(this).attr('rel', 'prettyPhoto[slideshow]'); });var images=container.find("a[rel*='prettyPhoto']:not(.inited):not(.esgbox):not([data-rel*='pretty']):not([rel*='magnific']):not([data-rel*='magnific'])").addClass('inited'); try { images.prettyPhoto({ social_tools: '', theme: 'facebook', deeplinking: false });} catch (e){};}else if(TRX_ADDONS_STORAGE['popup_engine']=='magnific'){ container.find("a[href$='jpg']:not(.inited),a[href$='jpeg']:not(.inited),a[href$='png']:not(.inited),a[href$='gif']:not(.inited)").each(function(){ if(jQuery(this).parents('.cq-dagallery').length==0) jQuery(this).attr('rel', 'magnific'); });var images=container.find("a[rel*='magnific']:not(.inited):not(.esgbox):not(.prettyphoto):not([rel*='pretty']):not([data-rel*='pretty'])").addClass('inited'); setTimeout(function(){ images.unbind('click.prettyphoto'); }, 100); try { images.magnificPopup({ type: 'image', mainClass: 'mfp-img-mobile', closeOnContentClick: true, closeBtnInside: true, fixedContentPos: true, midClick: true, preloader: true, tLoading: TRX_ADDONS_STORAGE['msg_magnific_loading'], gallery:{ enabled: true }, image: { tError: TRX_ADDONS_STORAGE['msg_magnific_error'], verticalFit: true }, zoom: { enabled: true, duration: 300, easing: 'ease-in-out', opener: function(openerElement){ if(!openerElement.is('img')){ if(openerElement.parents('.trx_addons_hover').find('img').length > 0) openerElement=openerElement.parents('.trx_addons_hover').find('img'); else if(openerElement.find('img').length > 0) openerElement=openerElement.find('img'); else if(openerElement.siblings('img').length > 0) openerElement=openerElement.siblings('img'); else if(openerElement.parent().parent().find('img').length > 0) openerElement=openerElement.parent().parent().find('img'); } return openerElement; }}, callbacks: { beforeClose: function(){ jQuery('.mfp-figure figcaption').hide(); jQuery('.mfp-figure .mfp-arrow').hide(); }} });} catch (e){}; container.find(".trx_addons_popup_link:not(.popup_inited)").addClass('popup_inited').magnificPopup({ type: 'inline', focus: 'input', closeBtnInside: true, callbacks: { open: function (){ if(jQuery(this.content).data('popup-content')===undefined) jQuery(this.content).data('popup-content', jQuery(this.content).html()); else jQuery(this.content).html(jQuery(this.content).data('popup-content')); jQuery(document).trigger('action.init_hidden_elements', [jQuery(this.content)]); jQuery(document).trigger('action.init_popup_elements', [jQuery(this.content)]); var frame=jQuery(this.content).find('.video_frame'); if(frame.length > 0){ frame.find('> iframe').each(function (){ var src=jQuery(this).attr('src'); if(src.indexOf('youtube')>=0||src.indexOf('vimeo')>=0){ jQuery(this).attr('src', trx_addons_add_to_url(src, {'autoplay': 1})); }});} var frame=jQuery(this.content).find('.esg-grid'); if(frame.length > 0){ var wrappers=[".esg-tc.eec", ".esg-lc.eec", ".esg-rc.eec", ".esg-cc.eec", ".esg-bc.eec"]; for (var i=0; i'+wrappers[i]).unwrap(); }} }, close: function (){ jQuery(this.content).empty(); }, resize: function (){ trx_addons_resize_actions(); }} });} if(container.find('a.post_counters_likes:not(.inited),a.comment_counters_likes:not(.inited)').length > 0){ container.find('a.post_counters_likes:not(.inited),a.comment_counters_likes:not(.inited)') .addClass('inited') .on('click', function(e){ var button=jQuery(this); var inc=button.hasClass('enabled') ? 1:-1; var post_id=button.hasClass('post_counters_likes') ? button.data('postid'):button.data('commentid'); var cookie_likes=trx_addons_get_cookie(button.hasClass('post_counters_likes') ? 'trx_addons_likes':'trx_addons_comment_likes'); if(cookie_likes===undefined||cookie_likes===null) cookie_likes=''; jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], { action: button.hasClass('post_counters_likes') ? 'post_counter':'comment_counter', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], post_id: post_id, likes: inc }).done(function(response){ var rez={}; try { rez=JSON.parse(response); } catch (e){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] }; console.log(response); } if(rez.error===''){ var counter=rez.counter; if(inc==1){ var title=button.data('title-dislike'); button.removeClass('enabled trx_addons_icon-heart-empty').addClass('disabled trx_addons_icon-heart'); cookie_likes +=(cookie_likes.substr(-1)!=',' ? ',':'') + post_id + ','; }else{ var title=button.data('title-like'); button.removeClass('disabled trx_addons_icon-heart').addClass('enabled trx_addons_icon-heart-empty'); cookie_likes=cookie_likes.replace(','+post_id+',', ','); } button.data('likes', counter).attr('title', title).find(button.hasClass('post_counters_likes') ? '.post_counters_number':'.comment_counters_number').html(counter); trx_addons_set_cookie(button.hasClass('post_counters_likes') ? 'trx_addons_likes':'trx_addons_comment_likes', cookie_likes, 365); }else{ alert(TRX_ADDONS_STORAGE['msg_error_like']); }});e.preventDefault(); return false; });} if(container.find('.trx_addons_emotions:not(.inited)').length > 0){ container.find('.trx_addons_emotions:not(.inited)') .addClass('inited') .on('click', '.trx_addons_emotions_item', function(e){ var button=jQuery(this); var button_active=button.parent().find('.trx_addons_emotions_active'); var post_id=button.data('postid'); jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], { action: 'post_counter', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], post_id: post_id, emotion_inc: button.data('slug'), emotion_dec: button_active.length > 0 ? button_active.data('slug'):'', }).done(function(response){ var rez={}; try { rez=JSON.parse(response); } catch (e){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] }; console.log(response); } if(rez.error===''){ var cookie_likes=trx_addons_get_cookie('trx_addons_emotions'), cookie_likes_new=','; if(cookie_likes){ cookie_likes=cookie_likes.split(','); for (var i=0; i 0){ button_active.removeClass('trx_addons_emotions_active'); } if(button_active.length==0||button.data('slug')!=button_active.data('slug')){ button.addClass('trx_addons_emotions_active'); cookie_likes +=(cookie_likes.substr(-1)!=',' ? ',':'') + post_id + '=' + button.data('slug') + ','; } for (var i in rez.counter) button.parent().find('[data-slug="'+i+'"] .trx_addons_emotions_item_number').html(rez.counter[i]); trx_addons_set_cookie('trx_addons_emotions', cookie_likes, 365); }else{ alert(TRX_ADDONS_STORAGE['msg_error_like']); }});e.preventDefault(); return false; });} if(container.find('.socials_share .socials_caption:not(.inited)').length > 0){ container.find('.socials_share .socials_caption:not(.inited)').each(function(){ jQuery(this).addClass('inited').on('click', function(e){ jQuery(this).siblings('.social_items').slideToggle(); e.preventDefault(); return false; });});} if(container.find('.socials_share .social_items:not(.inited)').length > 0){ container.find('.socials_share .social_items:not(.inited)').each(function(){ jQuery(this).addClass('inited').on('click', '.social_item_popup', function(e){ var url=jQuery(this).data('link'); window.open(url, '_blank', 'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=480, height=400, toolbar=0, status=0'); e.preventDefault(); return false; });});} container.find('.widget ul > li').each(function(){ if(jQuery(this).find('ul').length > 0){ jQuery(this).addClass('has_children'); }});container.find('.widget_archive a:not(.inited)').addClass('inited').each(function(){ var val=jQuery(this).html().split(' '); if(val.length > 1){ val[val.length-1]='' + val[val.length-1] + ''; jQuery(this).html(val.join(' ')) }});jQuery('.sc_layouts_menu_nav').each(function(){ if(jQuery(this).find('.current-menu-item').length==0||jQuery('body').hasClass('blog_template')){ if(TRX_ADDONS_STORAGE['menu_cache']===undefined) TRX_ADDONS_STORAGE['menu_cache']=[]; var id=jQuery(this).attr('id'); if(id===undefined){ id=('sc_layouts_menu_nav_' + Math.random()).replace('.', ''); jQuery(this).attr('id', id); } TRX_ADDONS_STORAGE['menu_cache'].push('#'+id); }});if(TRX_ADDONS_STORAGE['menu_cache']&&TRX_ADDONS_STORAGE['menu_cache'].length > 0){ var href=window.location.href; if(href.substr(-1)=='/') href=href.substr(0, href.length-1); var href2=href + '/'; for (var i=0; i < TRX_ADDONS_STORAGE['menu_cache'].length; i++){ var menu=jQuery(TRX_ADDONS_STORAGE['menu_cache'][i]+':not(.prepared)'); if(menu.length==0) continue; menu.addClass('prepared'); menu.find('li').removeClass('current-menu-ancestor current-menu-parent current-menu-item current_page_item'); menu.find('a[href="'+href+'"],a[href="'+href2+'"]').each(function(idx){ var li=jQuery(this).parent(); li.addClass('current-menu-item'); if(li.hasClass('menu-item-object-page')) li.addClass('current_page_item'); var cnt=0; while ((li=li.parents('li')).length > 0){ cnt++; li.addClass('current-menu-ancestor'+(cnt==1 ? ' current-menu-parent':'')); }});}} container.find('.trx_addons_scroll_to_top:not(.inited)').addClass('inited').on('click', function(e){ jQuery('html,body').animate({ scrollTop: 0 }, 'slow'); e.preventDefault(); return false; });jQuery(document).trigger('action.before_ready_trx_addons'); jQuery(document).trigger('action.ready_trx_addons'); jQuery(document).trigger('action.after_ready_trx_addons'); } if(TRX_ADDONS_STORAGE['ajax_views']){ jQuery(document).on('action.ready_trx_addons', function(){ if(!TRX_ADDONS_STORAGE['post_views_counter_inited']){ TRX_ADDONS_STORAGE['post_views_counter_inited']=true; setTimeout(function(){ jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], { action: 'post_counter', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], post_id: TRX_ADDONS_STORAGE['post_id'], views: 1 }).done(function(response){ var rez={}; try { rez=JSON.parse(response); } catch (e){ rez={ error: TRX_ADDONS_STORAGE['ajax_error'] }; console.log(response); } if(rez.error===''){ jQuery('.post_counters_single .post_counters_views .post_counters_number,.sc_layouts_title_meta .post_counters_views .post_counters_number').html(rez.counter); }});}, 10); }});} function trx_addons_scroll_actions(){ var scroll_offset=jQuery(window).scrollTop(); var scroll_to_top_button=jQuery('.trx_addons_scroll_to_top'); var adminbar_height=Math.max(0, jQuery('#wpadminbar').height()); if(scroll_to_top_button.length > 0){ if(scroll_offset > 100) scroll_to_top_button.addClass('show'); else scroll_to_top_button.removeClass('show'); } jQuery('[data-animation^="animated"]:not(.animated)').each(function(){ if(jQuery(this).offset().top < scroll_offset + jQuery(window).height()) jQuery(this).addClass(jQuery(this).data('animation')); });jQuery(document).trigger('action.scroll_trx_addons'); } function trx_addons_resize_actions(cont){ if(cont===undefined) cont=jQuery('body'); jQuery(document).trigger('action.resize_vc_row_start', [cont]); trx_addons_resize_video(cont); jQuery(document).trigger('action.resize_trx_addons', [cont]); jQuery(document).trigger('action.resize_vc_row_end', [cont]); } function trx_addons_resize_video(cont){ if(cont===undefined) cont=jQuery('body'); cont.find('video').each(function(){ if(jQuery(this).addClass('trx_addons_resize').parents('div:hidden,section:hidden,article:hidden').length > 0){ return; } var video=jQuery(this).eq(0); var ratio=(video.data('ratio')!=undefined ? video.data('ratio').split(':'):[16,9]); ratio=ratio.length!=2||ratio[0]==0||ratio[1]==0 ? 16/9:ratio[0]/ratio[1]; var mejs_cont=video.parents('.mejs-video'); var w_attr=video.data('width'); var h_attr=video.data('height'); if(!w_attr||!h_attr){ w_attr=video.attr('width'); h_attr=video.attr('height'); if(!w_attr||!h_attr) return; video.data({'width': w_attr, 'height': h_attr});} var percent=(''+w_attr).substr(-1)=='%'; w_attr=parseInt(w_attr, 10); h_attr=parseInt(h_attr, 10); var w_real=Math.round(mejs_cont.length > 0 ? Math.min(percent ? 10000:w_attr, mejs_cont.parents('div,article').width()):Math.min(percent ? 10000:w_attr, video.parents('div,article').width())), h_real=Math.round(percent ? w_real/ratio:w_real/w_attr*h_attr); if(parseInt(video.attr('data-last-width'), 10)==w_real) return; if(percent){ video.height(h_real); }else if(video.parents('.wp-video-playlist').length > 0){ if(mejs_cont.length===0){ video.attr({'width': w_real, 'height': h_real});}}else{ video.attr({'width': w_real, 'height': h_real}).css({'width': w_real+'px', 'height': h_real+'px'});if(mejs_cont.length > 0){ trx_addons_set_mejs_player_dimensions(video, w_real, h_real); }} video.attr('data-last-width', w_real); });cont.find('.video_frame iframe').each(function(){ if(jQuery(this).addClass('trx_addons_resize').parents('div:hidden,section:hidden,article:hidden').length > 0){ return; } var iframe=jQuery(this).eq(0); if(iframe.attr('src').indexOf('soundcloud')>0) return; var ratio=(iframe.data('ratio')!=undefined ? iframe.data('ratio').split(':'):(iframe.parent().data('ratio')!=undefined ? iframe.parent().data('ratio').split(':'):(iframe.find('[data-ratio]').length>0 ? iframe.find('[data-ratio]').data('ratio').split(':'):[16,9]))); ratio=ratio.length!=2||ratio[0]==0||ratio[1]==0 ? 16/9:ratio[0]/ratio[1]; var w_attr=iframe.attr('width'); var h_attr=iframe.attr('height'); if(!w_attr||!h_attr){ return; } var percent=(''+w_attr).substr(-1)=='%'; w_attr=parseInt(w_attr, 10); h_attr=parseInt(h_attr, 10); var pw=iframe.parent().width(), ph=iframe.parent().height(), w_real=pw, h_real=Math.round(percent ? w_real/ratio:w_real/w_attr*h_attr); if(iframe.parent().css('position')=='absolute'&&h_real > ph){ h_real=ph; w_real=Math.round(percent ? h_real*ratio:h_real*w_attr/h_attr) } if(parseInt(iframe.attr('data-last-width'), 10)==w_real) return; iframe.css({'width': w_real+'px', 'height': h_real+'px'});iframe.attr('data-last-width', w_real); });} function trx_addons_set_mejs_player_dimensions(video, w, h){ if(mejs){ for (var pl in mejs.players){ if(mejs.players[pl].media.src==video.attr('src')){ if(mejs.players[pl].media.setVideoSize){ mejs.players[pl].media.setVideoSize(w, h); }else if(mejs.players[pl].media.setSize){ mejs.players[pl].media.setSize(w, h); } mejs.players[pl].setPlayerSize(w, h); mejs.players[pl].setControlsSize(); }} }} });jQuery(document).on('action.ready_trx_addons', function(){ "use strict"; jQuery('form.trx_addons_popup_form_login:not(.inited)').addClass('inited').submit(function(e){ var rez=trx_addons_login_validate(jQuery(this)); if(!rez) e.preventDefault(); return rez; });jQuery('form.trx_addons_popup_form_register:not(.inited)').addClass('inited').submit(function(e){ var rez=trx_addons_registration_validate(jQuery(this)); if(!rez) e.preventDefault(); return rez; });function trx_addons_login_validate(form){ form.find('input').removeClass('trx_addons_field_error'); var error=trx_addons_form_validate(form, { error_message_time: 4000, exit_after_first_error: true, rules: [ { field: "log", min_length: { value: 1, message: TRX_ADDONS_STORAGE['msg_login_empty'] }, max_length: { value: 60, message: TRX_ADDONS_STORAGE['msg_login_long'] }}, { field: "pwd", min_length: { value: 1, message: TRX_ADDONS_STORAGE['msg_password_empty'] }, max_length: { value: 60, message: TRX_ADDONS_STORAGE['msg_password_long'] }} ] });if(TRX_ADDONS_STORAGE['login_via_ajax']&&!error){ jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], { action: 'trx_addons_login_user', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], redirect_to: form.find('input[name="redirect_to"]').length==1 ? form.find('input[name="redirect_to"]').val():'', remember: form.find('input[name="rememberme"]').val(), user_log: form.find('input[name="log"]').val(), user_pwd: form.find('input[name="pwd"]').val() }).done(function(response){ var rez={}; try { rez=JSON.parse(response); } catch(e){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] }; console.log(response); } var result=form.find(".trx_addons_message_box").toggleClass("trx_addons_message_box_error", false).toggleClass("trx_addons_message_box_success", false); if(rez.error===''){ result.addClass("trx_addons_message_box_success").html(TRX_ADDONS_STORAGE['msg_login_success']); setTimeout(function(){ if(rez.redirect_to!=''){ location.href=rez.redirect_to; }else{ location.reload(); }}, 3000); }else{ result.addClass("trx_addons_message_box_error").html(TRX_ADDONS_STORAGE['msg_login_error'] + (rez.error!==undefined ? '
' + rez.error:'')); } result.fadeIn().delay(3000).fadeOut(); });} return !TRX_ADDONS_STORAGE['login_via_ajax']&&!error; } function trx_addons_registration_validate(form){ form.find('input').removeClass('trx_addons_field_error'); var error=trx_addons_form_validate(form, { error_message_time: 4000, exit_after_first_error: true, rules: [ { field: "agree", state: { value: 'checked', message: TRX_ADDONS_STORAGE['msg_not_agree'] }, }, { field: "log", min_length: { value: 1, message: TRX_ADDONS_STORAGE['msg_login_empty'] }, max_length: { value: 60, message: TRX_ADDONS_STORAGE['msg_login_long'] }}, { field: "email", min_length: { value: 7, message: TRX_ADDONS_STORAGE['msg_email_not_valid'] }, max_length: { value: 60, message: TRX_ADDONS_STORAGE['msg_email_long'] }, mask: { value: TRX_ADDONS_STORAGE['email_mask'], message: TRX_ADDONS_STORAGE['msg_email_not_valid'] }}, { field: "pwd", min_length: { value: 4, message: TRX_ADDONS_STORAGE['msg_password_empty'] }, max_length: { value: 60, message: TRX_ADDONS_STORAGE['msg_password_long'] }}, { field: "pwd2", equal_to: { value: 'pwd', message: TRX_ADDONS_STORAGE['msg_password_not_equal'] }} ] });if(!error){ jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], { action: 'trx_addons_registration_user', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], redirect_to: form.find('input[name="redirect_to"]').length==1 ? form.find('input[name="redirect_to"]').val():'', user_name: form.find('input[name="log"]').val(), user_email: form.find('input[name="email"]').val(), user_pwd: form.find('input[name="pwd"]').val() }).done(function(response){ var rez={}; try { rez=JSON.parse(response); } catch (e){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] }; console.log(response); } var result=form.find(".trx_addons_message_box").toggleClass("trx_addons_message_box_error", false).toggleClass("trx_addons_message_box_success", false); if(rez.error===''){ result.addClass("trx_addons_message_box_success").html(TRX_ADDONS_STORAGE['msg_registration_success']); setTimeout(function(){ if(rez.redirect_to!=''){ location.href=rez.redirect_to; }else{ jQuery('#trx_addons_login_popup .trx_addons_tabs_title_login > a').trigger('click'); }}, 3000); }else{ result.addClass("trx_addons_message_box_error").html(TRX_ADDONS_STORAGE['msg_registration_error'] + (rez.error!==undefined ? '
' + rez.error:'')); } result.fadeIn().delay(3000).fadeOut(); });} return false; }});(function(){ "use strict"; function trx_addons_sc_fullheight(e, container){ if(container===undefined) container=jQuery('body'); if(container===undefined||container.length===undefined||container.length==0) return; container.find('.trx_addons_stretch_height').each(function (){ var fullheight_item=jQuery(this); if(jQuery(this).parents('div:hidden,article:hidden').length > 0){ return; } var wh=0; var fullheight_row=jQuery(this).parents('.vc_row-o-full-height'); if(fullheight_row.length > 0){ wh=fullheight_row.css('height')!='auto' ? fullheight_row.height():'auto'; }else{ if(jQuery(window).height() > 1000){ var adminbar=jQuery('#wpadminbar'); wh=jQuery(window).height() - (adminbar.length > 0 ? adminbar.height():0); } else wh='auto'; } if(wh=='auto'||wh > 0) fullheight_item.height(wh); });} jQuery(document).on('action.resize_trx_addons', trx_addons_sc_equalheight); function trx_addons_sc_equalheight(e, container){ if(container===undefined) container=jQuery('body'); if(container===undefined||container.length===undefined||container.length==0) return; container.find('[data-equal-height],.trx_addons_equal_height').each(function (){ var eh_wrap=jQuery(this); var eh_items_selector=eh_wrap.data('equal-height'); if(eh_items_selector===undefined) eh_items_selector='>*'; var max_h=0; var items=[]; var row_y=0; var i=0; eh_wrap.find(eh_items_selector).each(function(){ var el=jQuery(this); el.css('visibility', 'hidden').height('auto'); var el_height=el.height(); var el_offset=el.offset().top; if(row_y==0) row_y=el_offset; if(row_y < el_offset){ if(items.length > 0){ if(max_h > 0){ for (i=0; i max_h) max_h=el_height; items.push(el); });if(items.length > 0&&max_h > 0){ for (i=0; i 0){ jQuery('body:not(.sc_post_details_popup_inited)') .addClass('sc_post_details_popup_inited') .on('click', '#trx_addons_post_details_popup_overlay, .trx_addons_post_details_popup_close', function(e){ jQuery('#trx_addons_post_details_popup').fadeOut(); jQuery('#trx_addons_post_details_popup_overlay').fadeOut(); }) .on('click', '.trx_addons_post_details_popup_prev,.trx_addons_post_details_popup_next', function(e){ var popup=jQuery('#trx_addons_post_details_popup'); var post_item=popup.data('post_item'); if(!post_item||post_item.length==0) return; var posts_items=post_item.parents('.sc_item_columns,.sc_item_slider').find('[data-post_id]'); var cur_idx=-1; posts_items.each(function(idx){ if(jQuery(this).data('post_id')==post_item.data('post_id')) cur_idx=idx; });if(cur_idx==-1) return; post_item=jQuery(this).hasClass('trx_addons_post_details_popup_prev') ? (cur_idx > 0 ? posts_items.eq(cur_idx-1):false):(cur_idx < posts_items.length-1 ? posts_items.eq(cur_idx+1):false); if(!post_item||post_item.length==0) return; popup.fadeOut(); trx_addons_show_post_details(post_item, false); });} function trx_addons_show_post_details(post_item, show_overlay){ jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], { action: 'trx_addons_post_details_in_popup', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], post_id: post_item.data('post_id'), post_type: post_item.data('post_type') }).done(function(response){ var rez={}; if(response==''||response==0){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] };}else{ try { rez=JSON.parse(response); } catch (e){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] }; console.log(response); }} var msg=rez.error==='' ? rez.data:rez.error; var popup=jQuery('#trx_addons_post_details_popup'); var overlay=jQuery('#trx_addons_post_details_popup_overlay'); if(popup.length==0){ jQuery('body').append('
' + '
' + '
' + '' + '' + '' + '
'); popup=jQuery('#trx_addons_post_details_popup'); overlay=jQuery('#trx_addons_post_details_popup_overlay'); } popup.data('post_item', post_item).find('.trx_addons_post_details_content').html(msg); if(show_overlay) overlay.fadeIn(); popup.fadeIn(); });}});})(); (function(){ "use strict"; jQuery(document).on('action.init_shortcodes', trx_addons_js_composer_init); jQuery(document).on('action.init_hidden_elements', trx_addons_js_composer_init); function trx_addons_js_composer_init(e, container){ if(container===undefined) container=jQuery('body'); if(container.length===undefined||container.length==0) return; container.find('.vc_message_box_closeable:not(.inited)').addClass('inited').on('click', function(e){ jQuery(this).fadeOut(); e.preventDefault(); return false; });} jQuery(document).on('action.resize_trx_addons', trx_addons_js_composer_fix_column); jQuery(document).on('action.scroll_trx_addons', trx_addons_js_composer_fix_column); function trx_addons_js_composer_fix_column(e, cont){ if(cont===undefined) cont=jQuery('body'); cont.find('.vc_column_fixed').each(function(){ var col=jQuery(this), row=col.parent(); if(col.attr('class').indexOf('vc_col-lg-')!=-1||col.attr('class').indexOf('vc_col-md-')!=-1){ return; }else if(jQuery(window).width() < 768){ var old_style=col.data('old_style'); if(old_style!==undefined) col.attr('style', old_style).removeAttr('data-old_style'); }else{ var col_height=col.outerHeight(); var row_height=row.outerHeight(); var row_top=row.offset().top; var scroll_offset=jQuery(window).scrollTop(); var top_panel_fixed_height=trx_addons_fixed_rows_height(); if(col_height < row_height&&scroll_offset + top_panel_fixed_height > row_top){ var col_init={ 'position': 'undefined', 'top': 'auto', 'bottom':'auto' }; if(typeof TRX_ADDONS_STORAGE['scroll_offset_last']=='undefined'){ TRX_ADDONS_STORAGE['col_top_last']=row_top; TRX_ADDONS_STORAGE['scroll_offset_last']=scroll_offset; TRX_ADDONS_STORAGE['scroll_dir_last']=1; } var scroll_dir=scroll_offset - TRX_ADDONS_STORAGE['scroll_offset_last']; if(scroll_dir==0) scroll_dir=TRX_ADDONS_STORAGE['scroll_dir_last']; else scroll_dir=scroll_dir > 0 ? 1:-1; var col_big=col_height + 30 >=jQuery(window).height() - top_panel_fixed_height, col_top=col.offset().top; if(col_top < 0) col_top=TRX_ADDONS_STORAGE['col_top_last']; if(col_big){ if(scroll_dir!=TRX_ADDONS_STORAGE['scroll_dir_last']&&col.css('position')=='fixed'){ col_init.top=col_top - row_top; col_init.position='absolute'; }else if(scroll_dir > 0){ if(scroll_offset + jQuery(window).height() >=row_top + row_height + 30){ col_init.bottom=0; col_init.position='absolute'; }else if(scroll_offset + jQuery(window).height() >=(col.css('position')=='absolute' ? col_top:row_top) + col_height + 30){ col_init.bottom=30; col_init.position='fixed'; }}else{ if(scroll_offset + top_panel_fixed_height <=col_top){ col_init.top=top_panel_fixed_height; col_init.position='fixed'; }} }else{ if(scroll_offset + top_panel_fixed_height >=row_top + row_height - col_height){ col_init.bottom=0; col_init.position='absolute'; }else{ col_init.top=top_panel_fixed_height; col_init.position='fixed'; }} if(col_init.position!='undefined'){ if(!col.prev().hasClass('trx_addons_fixed_column_placeholder')){ col.before('
'); col.prev().removeClass('vc_column_fixed'); } col_init.left=col_init.position=='fixed' ? col.prev().offset().left:col.prev().position().left; col_init.width=col.prev().width(); if(col.css('position')!=col_init.position||TRX_ADDONS_STORAGE['scroll_dir_last']!=scroll_dir||col.width()!=col_init.width){ if(col.data('old_style')===undefined){ var style=col.attr('style'); if(!style) style=''; col.attr('data-old_style', style); } col.css(col_init); }} TRX_ADDONS_STORAGE['col_top_last']=col_top; TRX_ADDONS_STORAGE['scroll_offset_last']=scroll_offset; TRX_ADDONS_STORAGE['scroll_dir_last']=scroll_dir; }else{ var old_style=col.data('old_style'); if(old_style!==undefined){ col.attr('style', old_style).removeAttr('data-old_style'); if(col.prev().hasClass('trx_addons_fixed_column_placeholder')) col.prev().remove(); }} }});}})(); jQuery(document).on('action.ready_trx_addons', function(){ "use strict"; var rows=jQuery('.sc_layouts_row_fixed'), rows_always=jQuery('.sc_layouts_row_fixed_always'); if(rows.length > 0){ rows.each(function(){ if(!jQuery(this).next().hasClass('sc_layouts_row_fixed_placeholder')) jQuery(this).after('
'); });jQuery(document).on('action.scroll_trx_addons', function(){ trx_addons_cpt_layouts_fix_rows(rows, rows_always, false); });jQuery(document).on('action.resize_trx_addons', function(){ trx_addons_cpt_layouts_fix_rows(rows, rows_always, true); });} function trx_addons_cpt_layouts_fix_rows(rows, rows_always, resize){ if(jQuery(window).width() < 768){ rows.each(function(){ if(!jQuery(this).hasClass('sc_layouts_row_fixed_always')) jQuery(this).removeClass('sc_layouts_row_fixed_on').css({'top': 'auto'});});if(rows_always.length==0) return; else rows=rows_always; } var scroll_offset=jQuery(window).scrollTop(); var rows_offset=trx_addons_fixed_rows_height(true, false); rows.each(function(){ var placeholder=jQuery(this).next(); var offset=parseInt(jQuery(this).hasClass('sc_layouts_row_fixed_on') ? placeholder.offset().top:jQuery(this).offset().top, 10); if(isNaN(offset)) offset=0; if(scroll_offset + rows_offset <=offset){ if(jQuery(this).hasClass('sc_layouts_row_fixed_on')){ jQuery(this).removeClass('sc_layouts_row_fixed_on').css({'top': 'auto'});jQuery(document).trigger('action.sc_layouts_row_fixed_off'); }}else{ var h=jQuery(this).outerHeight(); if(!jQuery(this).hasClass('sc_layouts_row_fixed_on')){ if(rows_offset + h < jQuery(window).height() * 0.33){ placeholder.height(h); jQuery(this).addClass('sc_layouts_row_fixed_on').css({'top': rows_offset+'px'});h=jQuery(this).outerHeight(); jQuery(document).trigger('action.sc_layouts_row_fixed_on'); }}else if(resize&&jQuery(this).hasClass('sc_layouts_row_fixed_on')&&jQuery(this).offset().top!=rows_offset){ jQuery(this).css({'top': rows_offset+'px'});} rows_offset +=h; }});}});jQuery(document).on('action.init_shortcodes', function(e, container){ "use strict"; var toc_menu=jQuery('#toc_menu'); if(toc_menu.length==0) trx_addons_build_page_toc(); toc_menu=jQuery('#toc_menu:not(.inited)'); if(toc_menu.length==0) return; var toc_menu_items=toc_menu.addClass('inited').find('.toc_menu_item'); trx_addons_detect_active_toc(); var wheel_busy=false, wheel_time=0; jQuery('.toc_menu_item > a').on('click', function(e){ if(trx_addons_scroll_to_anchor(jQuery(this), true)){ e.preventDefault(); return false; }});jQuery(window).on('scroll', function(){ trx_addons_mark_active_toc(); });trx_addons_mark_active_toc(); if(TRX_ADDONS_STORAGE['scroll_to_anchor']==1){ var wheel_stop=false; jQuery(document).on('action.stop_wheel_handlers', function(e){ wheel_stop=true; });jQuery(document).on('action.start_wheel_handlers', function(e){ wheel_stop=false; });jQuery(window).bind('mousewheel DOMMouseScroll', function(e){ if(screen.width < 960||jQuery(window).width() < 960||wheel_stop||trx_addons_browser_is_ios()){ return; } if(wheel_busy||wheel_time==e.timeStamp){ e.preventDefault(); return false; } wheel_time=e.timeStamp; var wheel_dir=e.originalEvent.wheelDelta > 0||e.originalEvent.detail < 0 ? -1:1; var items=trx_addons_detect_active_toc(); var doit=false; var scroll_offset=parseInt(jQuery(window).scrollTop(), 10); var wh=jQuery(window).height(); var ah=jQuery('#wpadminbar').length > 0 ? jQuery('#wpadminbar').height():0; if(wheel_dir==-1){ doit=true; setTimeout(function(){ if(items.prev >=0&&items.prevOffset >=scroll_offset-wh-ah) trx_addons_scroll_to_anchor(toc_menu_items.eq(items.prev).find('a'), false); else trx_addons_document_animate_to(Math.max(0, scroll_offset-wh)); }, 10); }else{ doit=true; setTimeout(function(){ if(items.next >=0&&items.nextOffset <=scroll_offset+wh+ah) trx_addons_scroll_to_anchor(toc_menu_items.eq(items.next).find('a'), false); else trx_addons_document_animate_to(Math.min(jQuery(document).height(), scroll_offset+wh)); }, 10); } if(doit){ wheel_busy=true; setTimeout(function(){ wheel_busy=false; }, trx_addons_browser_is_ios() ? 1200:100); e.preventDefault(); return false; }});} function trx_addons_detect_active_toc(){ var items={ loc: '', current: [], prev: -1, prevOffset: -1, next: -1, nextOffset: -1 }; var fixed_rows_height=Math.ceil(trx_addons_fixed_rows_height()); toc_menu_items.each(function(idx){ var id='#'+jQuery(this).data('id'); var pos=id.indexOf('#'); if(pos < 0||id.length==1) return; var href=jQuery(this).find('a').attr('href'); if(!trx_addons_is_local_link(href)) return; var off=jQuery(id).offset().top; var id_next=jQuery(this).next().find('a').attr('href'); var off_next=id_next&&idx < toc_menu_items.length-1&&jQuery(id_next).length > 0 ? parseInt(jQuery(id_next).offset().top, 10):1000000; var scroll_offset=parseInt(jQuery(window).scrollTop(), 10); if(off > scroll_offset + fixed_rows_height + 20){ if(items.next < 0){ items.next=idx; items.nextOffset=off; }}else if(off < scroll_offset - fixed_rows_height - 20){ items.prev=idx; items.prevOffset=off; } if(off < scroll_offset + jQuery(window).height()*0.8&&scroll_offset < off_next - fixed_rows_height){ items.current.push(idx); if(items.loc==''){ var loc=window.location.href; var loc_pos=loc.indexOf('#'); if(loc_pos > 0) loc=loc.substring(0, loc_pos); items.loc=href.indexOf('#')==0 ? loc + id:id; }} });return items; } function trx_addons_mark_active_toc(){ var items=trx_addons_detect_active_toc(); toc_menu_items.removeClass('toc_menu_item_active'); for (var i=0; i=0&&href.length > 1&&trx_addons_is_local_link(href)){ wheel_busy=true; setTimeout(function(){ wheel_busy=false; }, trx_addons_browser_is_ios() ? 1200:100); trx_addons_document_animate_to(href.substr(pos), function(){ if(TRX_ADDONS_STORAGE['update_location_from_anchor']==1){ var loc=window.location.href; var loc_pos=loc.indexOf('#'); if(loc_pos > 0) loc=loc.substring(0, loc_pos); trx_addons_document_set_location(pos==0 ? loc + href:href); }});return true; } return false; } function trx_addons_build_page_toc(){ var toc='', toc_count=0; jQuery('[id^="toc_menu_"],.sc_anchor').each(function(idx){ var obj=jQuery(this); var obj_id=obj.attr('id')||('sc_anchor_'+Math.random()).replace('.', ''); var row=obj.parents('.wpb_row'); if(row.length==0) row=obj.parent(); var row_id=row.length>0&&row.attr('id')!=undefined&&row.attr('id')!='' ? row.attr('id'):''; var id=row_id||obj_id.substr(10); if(row.length>0&&row_id==''){ row.attr('id', id); } var url=obj.data('url'); var icon=obj.data('vc-icon')||'toc_menu_icon_default'; var sow_icon=obj.data('sow-icon')||''; var title=obj.attr('title'); var description=obj.data('description'); var separator=obj.data('separator'); toc_count++; toc +=''; });if(toc_count > 0) jQuery('body').append('
'+toc+'
'); }});jQuery(document).on('action.init_shortcodes', function(e, container){ "use strict"; if(container.find('.sc_form_form:not(.sc_form_custom):not(.inited)').length > 0){ container.find('.sc_form_form:not(.sc_form_custom):not(.inited)') .addClass('inited') .submit(function(e){ sc_form_validate(jQuery(this)); e.preventDefault(); return false; });} jQuery('input[type="text"]:not(.fill_inited),input[type="number"]:not(.fill_inited),input[type="search"]:not(.fill_inited),input[type="password"]:not(.fill_inited),input[type="email"]:not(.fill_inited),textarea:not(.fill_inited),select:not(.fill_inited)').each(function(){ var fld=jQuery(this); sc_form_mark_filled(fld); fld.addClass('fill_inited') .on('blur change', function(){ sc_form_mark_filled(jQuery(this)); if(jQuery(this).hasClass('filled')) jQuery(this).removeClass('trx_addons_field_error wpcf7-not-valid'); });});function sc_form_mark_filled(field){ if(field.val()!='') field.addClass('filled'); else field.removeClass('filled'); } function sc_form_validate(form){ var url=form.attr('action'); if(url=='') return false; form.find('input').removeClass('trx_addons_error_field'); var error=trx_addons_form_validate(form, { rules: [ { field: "name", min_length: { value: 1, message: TRX_ADDONS_STORAGE['msg_field_name_empty'] }, }, { field: "email", min_length: { value: 1, message: TRX_ADDONS_STORAGE['msg_field_email_empty'] }, mask: { value: TRX_ADDONS_STORAGE['email_mask'], message: TRX_ADDONS_STORAGE['msg_field_email_not_valid'] }}, { field: "message", min_length: { value: 1, message: TRX_ADDONS_STORAGE['msg_field_text_empty'] }, } ] });if(!error&&url!='#'){ jQuery.post(url, { action: "send_sc_form", nonce: TRX_ADDONS_STORAGE['ajax_nonce'], data: form.serialize() }).done(function(response){ var rez={}; try { rez=JSON.parse(response); } catch(e){ rez={ error: TRX_ADDONS_STORAGE['msg_ajax_error'] }; console.log(response); } var result=form.find(".trx_addons_message_box").toggleClass("trx_addons_message_box_error", false).toggleClass("trx_addons_message_box_success", false); if(rez.error===''){ form.get(0).reset(); result.addClass("trx_addons_message_box_success").html(TRX_ADDONS_STORAGE['msg_send_complete']); }else{ result.addClass("trx_addons_message_box_error").html(TRX_ADDONS_STORAGE['msg_send_error'] + ' ' + rez.error); } result.fadeIn().delay(3000).fadeOut(); });} return !error; }});'use strict'; (function (window, document){ 'use strict'; function Pathformer(element){ if(typeof element==='undefined'){ throw new Error('Pathformer [constructor]: "element" parameter is required'); } if(element.constructor===String){ element=document.getElementById(element); if(!element){ throw new Error('Pathformer [constructor]: "element" parameter is not related to an existing ID'); }} if(element.constructor instanceof window.SVGElement||/^svg$/i.test(element.nodeName)){ this.el=element; }else{ throw new Error('Pathformer [constructor]: "element" parameter must be a string or a SVGelement'); } this.scan(element); } Pathformer.prototype.TYPES=['line', 'ellipse', 'circle', 'polygon', 'polyline', 'rect']; Pathformer.prototype.ATTR_WATCH=['cx', 'cy', 'points', 'r', 'rx', 'ry', 'x', 'x1', 'x2', 'y', 'y1', 'y2']; Pathformer.prototype.scan=function (svg){ var fn, element, pathData, pathDom, elements=svg.querySelectorAll(this.TYPES.join(',')); for (var i=0; i < elements.length; i++){ element=elements[i]; fn=this[element.tagName.toLowerCase() + 'ToPath']; pathData=fn(this.parseAttr(element.attributes)); pathDom=this.pathMaker(element, pathData); element.parentNode.replaceChild(pathDom, element); }}; Pathformer.prototype.lineToPath=function (element){ var newElement={}; newElement.d='M' + element.x1 + ',' + element.y1 + 'L' + element.x2 + ',' + element.y2; return newElement; }; Pathformer.prototype.rectToPath=function (element){ var newElement={}, x=parseFloat(element.x)||0, y=parseFloat(element.y)||0, width=parseFloat(element.width)||0, height=parseFloat(element.height)||0; newElement.d='M' + x + ' ' + y + ' '; newElement.d +='L' + (x + width) + ' ' + y + ' '; newElement.d +='L' + (x + width) + ' ' + (y + height) + ' '; newElement.d +='L' + x + ' ' + (y + height) + ' Z'; return newElement; }; Pathformer.prototype.polylineToPath=function (element){ var i, path; var newElement={}; var points=element.points.trim().split(' '); if(element.points.indexOf(',')===-1){ var formattedPoints=[]; for (i=0; i < points.length; i+=2){ formattedPoints.push(points[i] + ',' + points[i+1]); } points=formattedPoints; } path='M' + points[0]; for(i=1; i < points.length; i++){ if(points[i].indexOf(',')!==-1){ path +='L' + points[i]; }} newElement.d=path; return newElement; }; Pathformer.prototype.polygonToPath=function (element){ var newElement=Pathformer.prototype.polylineToPath(element); newElement.d +='Z'; return newElement; }; Pathformer.prototype.ellipseToPath=function (element){ var startX=element.cx - element.rx, startY=element.cy; var endX=parseFloat(element.cx) + parseFloat(element.rx), endY=element.cy; var newElement={}; newElement.d='M' + startX + ',' + startY + 'A' + element.rx + ',' + element.ry + ' 0,1,1 ' + endX + ',' + endY + 'A' + element.rx + ',' + element.ry + ' 0,1,1 ' + startX + ',' + endY; return newElement; }; Pathformer.prototype.circleToPath=function (element){ var newElement={}; var startX=element.cx - element.r, startY=element.cy; var endX=parseFloat(element.cx) + parseFloat(element.r), endY=element.cy; newElement.d='M' + startX + ',' + startY + 'A' + element.r + ',' + element.r + ' 0,1,1 ' + endX + ',' + endY + 'A' + element.r + ',' + element.r + ' 0,1,1 ' + startX + ',' + endY; return newElement; }; Pathformer.prototype.pathMaker=function (element, pathData){ var i, attr, pathTag=document.createElementNS('http://www.w3.org/2000/svg','path'); for(i=0; i < element.attributes.length; i++){ attr=element.attributes[i]; if(this.ATTR_WATCH.indexOf(attr.name)===-1){ pathTag.setAttribute(attr.name, attr.value); }} for(i in pathData){ pathTag.setAttribute(i, pathData[i]); } return pathTag; }; Pathformer.prototype.parseAttr=function (element){ var attr, output={}; for (var i=0; i < element.length; i++){ attr=element[i]; if(this.ATTR_WATCH.indexOf(attr.name)!==-1&&attr.value.indexOf('%')!==-1){ throw new Error('Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into \'path\' tags. Please use \'viewBox\'.'); } output[attr.name]=attr.value; } return output; }; 'use strict'; var requestAnimFrame, cancelAnimFrame, parsePositiveInt; function Vivus (element, options, callback){ this.isReady=false; this.setElement(element, options); this.setOptions(options); this.setCallback(callback); if(this.isReady){ this.init(); }} Vivus.LINEAR=function (x){return x;}; Vivus.EASE=function (x){return -Math.cos(x * Math.PI) / 2 + 0.5;}; Vivus.EASE_OUT=function (x){return 1 - Math.pow(1-x, 3);}; Vivus.EASE_IN=function (x){return Math.pow(x, 3);}; Vivus.EASE_OUT_BOUNCE=function (x){ var base=-Math.cos(x * (0.5 * Math.PI)) + 1, rate=Math.pow(base,1.5), rateR=Math.pow(1 - x, 2), progress=-Math.abs(Math.cos(rate * (2.5 * Math.PI))) + 1; return (1- rateR) + (progress * rateR); }; Vivus.prototype.setElement=function (element, options){ if(typeof element==='undefined'){ throw new Error('Vivus [constructor]: "element" parameter is required'); } if(element.constructor===String){ element=document.getElementById(element); if(!element){ throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID'); }} this.parentEl=element; if(options&&options.file){ var objElm=document.createElement('object'); objElm.setAttribute('type', 'image/svg+xml'); objElm.setAttribute('data', options.file); objElm.setAttribute('built-by-vivus', 'true'); element.appendChild(objElm); element=objElm; } switch (element.constructor){ case window.SVGSVGElement: case window.SVGElement: this.el=element; this.isReady=true; break; case window.HTMLObjectElement: var onLoad, self; self=this; onLoad=function (e){ if(self.isReady){ return; } self.el=element.contentDocument&&element.contentDocument.querySelector('svg'); if(!self.el&&e){ throw new Error('Vivus [constructor]: object loaded does not contain any SVG'); }else if(self.el){ if(element.getAttribute('built-by-vivus')){ self.parentEl.insertBefore(self.el, element); self.parentEl.removeChild(element); self.el.setAttribute('width', '100%'); self.el.setAttribute('height', '100%'); } self.isReady=true; self.init(); return true; }}; if(!onLoad()){ element.addEventListener('load', onLoad); } break; default: throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)'); }}; Vivus.prototype.setOptions=function (options){ var allowedTypes=['delayed', 'async', 'oneByOne', 'scenario', 'scenario-sync']; var allowedStarts=['inViewport', 'manual', 'autostart']; if(options!==undefined&&options.constructor!==Object){ throw new Error('Vivus [constructor]: "options" parameter must be an object'); }else{ options=options||{};} if(options.type&&allowedTypes.indexOf(options.type)===-1){ throw new Error('Vivus [constructor]: ' + options.type + ' is not an existing animation `type`'); }else{ this.type=options.type||allowedTypes[0]; } if(options.start&&allowedStarts.indexOf(options.start)===-1){ throw new Error('Vivus [constructor]: ' + options.start + ' is not an existing `start` option'); }else{ this.start=options.start||allowedStarts[0]; } this.isIE=(window.navigator.userAgent.indexOf('MSIE')!==-1||window.navigator.userAgent.indexOf('Trident/')!==-1||window.navigator.userAgent.indexOf('Edge/')!==-1); this.duration=parsePositiveInt(options.duration, 120); this.delay=parsePositiveInt(options.delay, null); this.dashGap=parsePositiveInt(options.dashGap, 1); this.forceRender=options.hasOwnProperty('forceRender') ? !!options.forceRender:this.isIE; this.selfDestroy = !!options.selfDestroy; this.onReady=options.onReady; this.frameLength=this.currentFrame=this.map=this.delayUnit=this.speed=this.handle=null; this.ignoreInvisible=options.hasOwnProperty('ignoreInvisible') ? !!options.ignoreInvisible:false; this.animTimingFunction=options.animTimingFunction||Vivus.LINEAR; this.pathTimingFunction=options.pathTimingFunction||Vivus.LINEAR; if(this.delay >=this.duration){ throw new Error('Vivus [constructor]: delay must be shorter than duration'); }}; Vivus.prototype.setCallback=function (callback){ if(!!callback&&callback.constructor!==Function){ throw new Error('Vivus [constructor]: "callback" parameter must be a function'); } this.callback=callback||function (){};}; Vivus.prototype.mapping=function (){ var i, paths, path, pAttrs, pathObj, totalLength, lengthMeter, timePoint; timePoint=totalLength=lengthMeter=0; paths=this.el.querySelectorAll('path'); for (i=0; i < paths.length; i++){ path=paths[i]; if(this.isInvisible(path)){ continue; } pathObj={ el: path, length: Math.ceil(path.getTotalLength()) }; if(isNaN(pathObj.length)){ if(window.console&&console.warn){ console.warn('Vivus [mapping]: cannot retrieve a path element length', path); } continue; } this.map.push(pathObj); path.style.strokeDasharray=pathObj.length + ' ' + (pathObj.length + this.dashGap * 2); path.style.strokeDashoffset=pathObj.length + this.dashGap; pathObj.length +=this.dashGap; totalLength +=pathObj.length; this.renderPath(i); } totalLength=totalLength===0 ? 1:totalLength; this.delay=this.delay===null ? this.duration / 3:this.delay; this.delayUnit=this.delay / (paths.length > 1 ? paths.length - 1:1); for (i=0; i < this.map.length; i++){ pathObj=this.map[i]; switch (this.type){ case 'delayed': pathObj.startAt=this.delayUnit * i; pathObj.duration=this.duration - this.delay; break; case 'oneByOne': pathObj.startAt=lengthMeter / totalLength * this.duration; pathObj.duration=pathObj.length / totalLength * this.duration; break; case 'async': pathObj.startAt=0; pathObj.duration=this.duration; break; case 'scenario-sync': path=pathObj.el; pAttrs=this.parseAttr(path); pathObj.startAt=timePoint + (parsePositiveInt(pAttrs['data-delay'], this.delayUnit)||0); pathObj.duration=parsePositiveInt(pAttrs['data-duration'], this.duration); timePoint=pAttrs['data-async']!==undefined ? pathObj.startAt:pathObj.startAt + pathObj.duration; this.frameLength=Math.max(this.frameLength, (pathObj.startAt + pathObj.duration)); break; case 'scenario': path=pathObj.el; pAttrs=this.parseAttr(path); pathObj.startAt=parsePositiveInt(pAttrs['data-start'], this.delayUnit)||0; pathObj.duration=parsePositiveInt(pAttrs['data-duration'], this.duration); this.frameLength=Math.max(this.frameLength, (pathObj.startAt + pathObj.duration)); break; } lengthMeter +=pathObj.length; this.frameLength=this.frameLength||this.duration; }}; Vivus.prototype.drawer=function (){ var self=this; this.currentFrame +=this.speed; if(this.currentFrame <=0){ this.stop(); this.reset(); this.callback(this); }else if(this.currentFrame >=this.frameLength){ this.stop(); this.currentFrame=this.frameLength; this.trace(); if(this.selfDestroy){ this.destroy(); } this.callback(this); }else{ this.trace(); this.handle=requestAnimFrame(function (){ self.drawer(); });}}; Vivus.prototype.trace=function (){ var i, progress, path, currentFrame; currentFrame=this.animTimingFunction(this.currentFrame / this.frameLength) * this.frameLength; for (i=0; i < this.map.length; i++){ path=this.map[i]; progress=(currentFrame - path.startAt) / path.duration; progress=this.pathTimingFunction(Math.max(0, Math.min(1, progress))); if(path.progress!==progress){ path.progress=progress; path.el.style.strokeDashoffset=Math.floor(path.length * (1 - progress)); this.renderPath(i); }} }; Vivus.prototype.renderPath=function (index){ if(this.forceRender&&this.map&&this.map[index]){ var pathObj=this.map[index], newPath=pathObj.el.cloneNode(true); pathObj.el.parentNode.replaceChild(newPath, pathObj.el); pathObj.el=newPath; }}; Vivus.prototype.init=function (){ this.frameLength=0; this.currentFrame=0; this.map=[]; new Pathformer(this.el); this.mapping(); this.starter(); if(this.onReady){ this.onReady(this); }}; Vivus.prototype.starter=function (){ switch (this.start){ case 'manual': return; case 'autostart': this.play(); break; case 'inViewport': var self=this, listener=function (){ if(self.isInViewport(self.parentEl, 1)){ self.play(); window.removeEventListener('scroll', listener); }}; window.addEventListener('scroll', listener); listener(); break; }}; Vivus.prototype.getStatus=function (){ return this.currentFrame===0 ? 'start':this.currentFrame===this.frameLength ? 'end':'progress'; }; Vivus.prototype.reset=function (){ return this.setFrameProgress(0); }; Vivus.prototype.finish=function (){ return this.setFrameProgress(1); }; Vivus.prototype.setFrameProgress=function (progress){ progress=Math.min(1, Math.max(0, progress)); this.currentFrame=Math.round(this.frameLength * progress); this.trace(); return this; }; Vivus.prototype.play=function (speed){ if(speed&&typeof speed!=='number'){ throw new Error('Vivus [play]: invalid speed'); } this.speed=speed||1; if(!this.handle){ this.drawer(); } return this; }; Vivus.prototype.stop=function (){ if(this.handle){ cancelAnimFrame(this.handle); this.handle=null; } return this; }; Vivus.prototype.destroy=function (){ this.stop(); var i, path; for (i=0; i < this.map.length; i++){ path=this.map[i]; path.el.style.strokeDashoffset=null; path.el.style.strokeDasharray=null; this.renderPath(i); }}; Vivus.prototype.isInvisible=function (el){ var rect, ignoreAttr=el.getAttribute('data-ignore'); if(ignoreAttr!==null){ return ignoreAttr!=='false'; } if(this.ignoreInvisible){ rect=el.getBoundingClientRect(); return !rect.width&&!rect.height; }else{ return false; }}; Vivus.prototype.parseAttr=function (element){ var attr, output={}; if(element&&element.attributes){ for (var i=0; i < element.attributes.length; i++){ attr=element.attributes[i]; output[attr.name]=attr.value; }} return output; }; Vivus.prototype.isInViewport=function (el, h){ var scrolled=this.scrollY(), viewed=scrolled + this.getViewportH(), elBCR=el.getBoundingClientRect(), elHeight=elBCR.height, elTop=scrolled + elBCR.top, elBottom=elTop + elHeight; h=h||0; return (elTop + elHeight * h) <=viewed&&(elBottom) >=scrolled; }; Vivus.prototype.docElem=window.document.documentElement; Vivus.prototype.getViewportH=function (){ var client=this.docElem.clientHeight, inner=window.innerHeight; if(client < inner){ return inner; }else{ return client; }}; Vivus.prototype.scrollY=function (){ return window.pageYOffset||this.docElem.scrollTop; }; requestAnimFrame=(function (){ return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){ return window.setTimeout(callback, 1000 / 60); }); })(); cancelAnimFrame=(function (){ return(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(id){ return window.clearTimeout(id); }); })(); parsePositiveInt=function (value, defaultValue){ var output=parseInt(value, 10); return (output >=0) ? output:defaultValue; }; if(typeof define==='function'&&define.amd){ define([], function(){ return Vivus; });}else if(typeof exports==='object'){ module.exports=Vivus; }else{ window.Vivus=Vivus; }}(window, document)); jQuery(document).on('action.init_shortcodes', function(e, container){ "use strict"; var time=50; container.find('.sc_icon_type_svg:not(.inited)').each(function(idx){ var cont=jQuery(this); var id=cont.addClass('inited').attr('id'); if(id===undefined){ id='sc_icons_'+Math.random(); id=id.replace('.', ''); } else id +='_'+idx; cont.find('svg').attr('id', id); setTimeout(function(){ cont.css('visibility', 'visible'); var obj=new Vivus(id, {type: 'async', duration: 20});cont.data('svg_obj', obj); cont.parent().hover(function(){ cont.data('svg_obj').reset().play(); }, function(){ }); }, time); time +=300; });});jQuery(document).on('action.init_shortcodes', function(e, container){ "use strict"; jQuery('.sc_popup:not(.inited)').each(function(){ var id=jQuery(this).attr('id'); if(!id) return; jQuery('a[href="#'+id+'"]').addClass('trx_addons_popup_link'); jQuery(this).addClass('inited'); });});(function(){ "use strict"; jQuery(document).on('action.init_hidden_elements', trx_addons_sc_skills_init); jQuery(document).on('action.init_shortcodes', trx_addons_sc_skills_init); jQuery(document).on('action.scroll_trx_addons', trx_addons_sc_skills_init); jQuery(document).on('action.resize_trx_addons', trx_addons_sc_skills_resize); function trx_addons_sc_skills_init(e, container){ if(container===undefined) container=jQuery('body'); var scrollPosition=jQuery(window).scrollTop() + jQuery(window).height(); container.find('.sc_skills_item:not(.inited)').each(function (){ var skillsItem=jQuery(this); if(jQuery(this).parents('div:hidden,article:hidden').length > 0){ return; } var scrollSkills=skillsItem.offset().top; if(scrollPosition > scrollSkills){ var init_ok=true; var skills=skillsItem.parents('.sc_skills').eq(0); var type=skills.data('type'); var total=(type=='pie'&&skills.hasClass('sc_skills_compact_on')) ? skillsItem.find('.sc_skills_data .pie'):skillsItem.find('.sc_skills_total').eq(0); var start=parseFloat(total.data('start')); var stop=parseFloat(total.data('stop')); var maximum=parseInt(total.data('max'), 10); var startPercent=Math.round(start/maximum*100); var stopPercent=Math.round(stop/maximum*100); var ed=total.data('ed'); var speed=parseInt(total.data('speed'), 10); var step=start!=parseInt(start, 10)||stop!=parseInt(stop, 10) ? parseFloat(total.data('step')):parseInt(total.data('step'), 10); var duration=parseInt(total.data('duration'), 10); if(isNaN(duration)) duration=Math.ceil(maximum/step)*speed; if(type=='bar'){ var dir=skills.data('dir'); var count=skillsItem.find('.sc_skills_count').eq(0); if(dir=='horizontal') count.css('width', startPercent + '%').animate({ width: stopPercent + '%' }, duration); else if(dir=='vertical') count.css('height', startPercent + '%').animate({ height: stopPercent + '%' }, duration); trx_addons_sc_skills_animate_counter(start, stop, speed, step, ed, total); }else if(type=='counter'){ trx_addons_sc_skills_animate_counter(start, stop, speed, step, ed, total); }else if(type=='pie'){ if(window.Chart){ var steps=parseInt(total.data('steps'), 10); var bg_color=total.data('bg_color'); var border_color=total.data('border_color'); var cutout=parseInt(total.data('cutout'), 10); var easing=total.data('easing'); var options={ segmentShowStroke: border_color!='', segmentStrokeColor: border_color, segmentStrokeWidth: border_color!='' ? 1:0, percentageInnerCutout: cutout, animation: skillsItem.parents('.vc_row[data-vc-full-width="true"]').length==0, animationSteps: steps, animationEasing: easing, animateRotate: true, animateScale: skillsItem.parents('.vc_row[data-vc-full-width="true"]').length==0, }; var pieData=[]; total.each(function(){ var color=jQuery(this).data('color'); var stop=parseInt(jQuery(this).data('stop'), 10); var stopPercent=Math.round(stop/maximum*100); pieData.push({ value: stopPercent, color: color });});if(total.length==1){ trx_addons_sc_skills_animate_counter(start, stop, Math.round(1500/steps), step, ed, total); pieData.push({ value: 100-stopPercent, color: bg_color });} var canvas=skillsItem.find('canvas'); canvas .data('pie-data', pieData) .data('pie-options', options) .attr({width: skillsItem.width(), height: skillsItem.width()}) .css({width: skillsItem.width(), height: skillsItem.height()});new Chart(canvas.get(0).getContext("2d")).Doughnut(pieData, options); } else init_ok=false; } if(init_ok) skillsItem.addClass('inited'); }});} function trx_addons_sc_skills_animate_counter(start, stop, speed, step, ed, total){ start=Math.min(stop, start + step); total.text(start+ed); if(start < stop){ setTimeout(function (){ trx_addons_sc_skills_animate_counter(start, stop, speed, step, ed, total); }, speed); }} function trx_addons_sc_skills_resize(){ jQuery('.sc_skills_pie canvas').each(function (){ var canvas=jQuery(this); if(canvas.parents('div:hidden,article:hidden').length > 0){ return; } var skillsItem=canvas.parent(); if(skillsItem.width()!=canvas.width()){ var data=canvas.data('pie-data'); var opt=canvas.data('pie-options'); if(data===undefined||opt===undefined) return; canvas.empty() .attr({width: skillsItem.width(), height: skillsItem.width()}) .css({width: skillsItem.width(), height: skillsItem.height()});opt.animation=false; new Chart(canvas.get(0).getContext("2d")).Doughnut(data, opt); }});}})(); jQuery(document).on('action.ready_trx_addons', function(){ "use strict"; jQuery('.sc_recent_news_header_category_item_more:not(.inited)') .addClass('inited') .on('click', function(){ jQuery(this).toggleClass('opened').find('.sc_recent_news_header_more_categories').slideToggle(); });});(function(){ "use strict"; jQuery(document).on('action.init_sliders', trx_addons_init_sliders); jQuery(document).on('action.init_hidden_elements', trx_addons_init_hidden_sliders); function trx_addons_init_sliders(e, container){ if(container.find('.sc_slider_controller:not(.inited)').length > 0){ container.find('.sc_slider_controller:not(.inited)') .each(function (){ var controller=jQuery(this).addClass('inited'); var slider_id=controller.data('slider-id'); if(!slider_id) return; var controller_id=controller.attr('id'); if(controller_id==undefined){ controller_id='sc_slider_controller_'+Math.random(); controller_id=controller_id.replace('.', ''); controller.attr('id', controller_id); } jQuery('#'+slider_id+' .slider_container').attr('data-controller', controller_id); var controller_style=controller.data('style'); var controller_effect=controller.data('effect'); var controller_direction=controller.data('direction'); var controller_interval=controller.data('interval'); var controller_height=controller.data('height'); var controller_per_view=controller.data('slides-per-view'); var controller_space=controller.data('slides-space'); var controller_controls=controller.data('controls'); var controller_html=''; jQuery('#'+slider_id+' .swiper-slide') .each(function (idx){ var slide=jQuery(this); var image=slide.data('image'); var title=slide.data('title'); var cats=slide.data('cats'); var date=slide.data('date'); controller_html +='
' + '
' + ''+(idx < 9 ? '0':'')+(idx+1)+'' + ''+title+'' + '
' + '
'; });controller.html('
' + '
' + '
' + controller_html + '
' + '
' + (controller_controls==1 ? '
':'') + '
'); });} if(container.find('.sc_slider_controls:not(.inited)').length > 0){ container.find('.sc_slider_controls:not(.inited)') .each(function (){ var controls=jQuery(this).addClass('inited'); var slider_id=controls.data('slider-id'); if(!slider_id) return; slider_id +='_swiper'; if(jQuery('#'+slider_id).length==0) return; controls.on('click', 'a', function(e){ if(jQuery(this).hasClass('slider_next')) TRX_ADDONS_STORAGE['swipers'][slider_id].slideNext(); else TRX_ADDONS_STORAGE['swipers'][slider_id].slidePrev(); e.preventDefault(); return false; });if(controls.find('.slider_progress_bar').length > 0){ var bar=controls.find('.slider_progress_bar'); jQuery('#'+slider_id).on('slider_init slide_change_start', function(e){ if(TRX_ADDONS_STORAGE['swipers'][slider_id]){ var s=TRX_ADDONS_STORAGE['swipers'][slider_id]; var current=jQuery(s.slides[s.activeIndex]).data('slide-number') + 1, total=s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup):s.snapGrid.length; if(total > 0) bar.width(Math.ceil(current/total*100)+'%'); }});bar.parent().on('click', function(e){ var s=TRX_ADDONS_STORAGE['swipers'][slider_id]; var total=s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup):s.snapGrid.length; var slide_number=Math.max(0, Math.min(total-1, Math.floor(total * e.offsetX / jQuery(this).width()))); var slide_idx=jQuery('#'+slider_id).find('[data-slide-number="'+slide_number+'"]').index(); s.slideTo(slide_idx); e.preventDefault(); return false; });}});} if(container.find('.slider_swiper:not(.inited)').length > 0){ container.find('.slider_swiper:not(.inited)') .each(function (){ if(jQuery(this).parents('div:hidden,article:hidden').length > 0) return; var slider=jQuery(this); var id=slider.attr('id'); if(id==undefined){ id='swiper_'+Math.random(); id=id.replace('.', ''); slider.attr('id', id); } var cont=slider.parent().hasClass('slider_swiper_outer') ? slider.parent().attr('id', id+'_outer'):slider; var cont_id=cont.attr('id'); var is_controller=slider.parents('.sc_slider_controller').length > 0; var controller_id=slider.data('controller'); slider.find('.swiper-slide').each(function(idx){ jQuery(this).attr('data-slide-number', idx); });slider.css({ 'display': 'block', 'opacity': 0 }) .addClass(id) .addClass('inited') .data('settings', {mode: 'horizontal'});var direction=slider.data('direction'); if(direction!='vertical') direction='horizontal'; var smw=slider.data('slides-min-width'); if(smw===undefined){ smw=180; slider.attr('data-slides-min-width', smw); } var spv=slider.data('slides-per-view'); if(spv==undefined||slider.parents('.widget_nav_menu').length > 0){ spv=1; slider.attr('data-slides-per-view', spv); } var width=slider.width(); if(width==0) width=slider.parent().width(); if(direction=='horizontal'){ if(width / spv < smw) spv=Math.max(1, Math.floor(width / smw)); } var space=slider.data('slides-space'); if(space==undefined) space=0; var interval=slider.data('interval'); if(interval===undefined) interval=Math.round(5000 * (1 + Math.random())); if(isNaN(interval)) interval=0; if(TRX_ADDONS_STORAGE['swipers']===undefined) TRX_ADDONS_STORAGE['swipers']={}; TRX_ADDONS_STORAGE['swipers'][id]=new Swiper('.'+id, { direction: direction, calculateHeight: !slider.hasClass('slider_height_fixed'), resizeReInit: true, autoResize: true, effect: slider.data('effect') ? slider.data('effect'):'slide', pagination: slider.hasClass('slider_pagination') ? '#'+cont_id+' .slider_pagination_wrap':false, paginationClickable: slider.hasClass('slider_pagination') ? '#'+cont_id+' .slider_pagination_wrap':false, paginationType: slider.hasClass('slider_pagination')&&slider.data('pagination') ? slider.data('pagination'):'bullets', nextButton: slider.hasClass('slider_controls') ? '#'+cont_id+' .slider_next':false, prevButton: slider.hasClass('slider_controls') ? '#'+cont_id+' .slider_prev':false, autoplay: slider.hasClass('slider_noautoplay')||interval==0 ? false:parseInt(interval, 10), autoplayDisableOnInteraction: true, initialSlide: 0, slidesPerView: spv, loopedSlides: spv, spaceBetween: space, speed: 600, centeredSlides: false, loop: true, grabCursor: !is_controller, slideToClickedSlide: is_controller, touchRatio: is_controller ? 0.2:1, onSlideChangeStart: function (swiper){ cont.find('.slider_titles_outside_wrap .active').removeClass('active').fadeOut(); var controlled_slider=jQuery('#'+slider.data(is_controller ? 'controlled-slider':'controller')+' .slider_swiper'); var controlled_id=controlled_slider.attr('id'); if(TRX_ADDONS_STORAGE['swipers'][controlled_id]&&jQuery('#'+controlled_id).attr('data-busy')!=1){ slider.attr('data-busy', 1); setTimeout(function(){ slider.attr('data-busy', 0); }, 300); var slide_number=jQuery(swiper.slides[swiper.activeIndex]).data('slide-number'); var slide_idx=controlled_slider.find('[data-slide-number="'+slide_number+'"]').index(); TRX_ADDONS_STORAGE['swipers'][controlled_id].slideTo(slide_idx); } slider.trigger('slide_change_start'); }, onSlideChangeEnd: function (swiper){ var slide_number=jQuery(swiper.slides[swiper.activeIndex]).data('slide-number'); var titles=cont.find('.slider_titles_outside_wrap .slide_info'); if(titles.length > 0){ titles.eq(slide_number).addClass('active').fadeIn(300); } cont.find('.swiper-pagination-custom > span') .removeClass('swiper-pagination-button-active') .eq(slide_number) .addClass('swiper-pagination-button-active'); cont.find('.trx_addons_video_player.with_cover.video_play').removeClass('video_play').find('.video_embed').empty(); slider.attr('data-busy', 0); slider.trigger('slide_change_end'); }});slider.trigger('slider_init'); cont.find('.swiper-pagination-custom').on('click', '>span', function(e){ jQuery(this).siblings().removeClass('swiper-pagination-button-active'); var t=jQuery(this).addClass('swiper-pagination-button-active').index() * TRX_ADDONS_STORAGE['swipers'][id].params.slidesPerGroup; TRX_ADDONS_STORAGE['swipers'][id].params.loop&&(t +=TRX_ADDONS_STORAGE['swipers'][id].loopedSlides), TRX_ADDONS_STORAGE['swipers'][id].slideTo(t); e.preventDefault(); return false; });slider.attr('data-busy', 1).animate({'opacity':1}, 'fast'); setTimeout(function(){ slider.attr('data-busy', 0); trx_addons_set_controller_height(controller_id, slider); }, 300); jQuery(window).trigger('scroll'); });} if(container.find('.slider_elastistack:not(.inited)').length > 0){ container.find('.slider_elastistack:not(.inited)') .each(function (){ if(jQuery(this).parents('div:hidden,article:hidden').length > 0) return; var slider=jQuery(this); var id=slider.attr('id'); if(id==undefined){ id='elastistack_'+Math.random(); id=id.replace('.', ''); slider.attr('id', id); } var cont=slider.parent().hasClass('slider_outer') ? slider.parent().attr('id', id+'_outer'):slider; var cont_id=cont.attr('id'); var images=slider.find('ul.stack__images').attr('id', id+'_images'); var images_id=images.attr('id'); slider.css({ 'display': 'block', 'opacity': 0 }) .addClass(id) .addClass('inited') .data('settings', {mode: 'horizontal'});trx_addons_resize_sliders(e, cont); var stack=new ElastiStack(images.get(0), { onUpdateStack:function(idx){ var titles=cont.find('.slider_titles_outside_wrap'); if(titles.length > 0){ titles.find('.active').removeClass('active').hide(); titles.find('.slide_info').eq(idx).addClass('active').fadeIn(300); } cont.find('.trx_addons_video_player.with_cover.video_play').removeClass('video_play').find('.video_embed').empty(); slider.trigger('slide_change_end'); }});cont.find('.slider_next').on('click', function(e){ stack.nextItem({ transform:'translate3d(0, -60px, 400px)' }); e.preventDefault(); return false; });cont.find('.slider_titles_outside_wrap .slide_info').eq(0).addClass('active').fadeIn(300); slider.animate({'opacity':1}, 'fast', function(){ stack._setStackStyle(); });});}} function trx_addons_init_hidden_sliders(e, container){ trx_addons_init_sliders(e, container); trx_addons_resize_sliders(e, container); } jQuery(document).on('action.resize_trx_addons', trx_addons_resize_sliders); function trx_addons_resize_sliders(e, container){ if(container===undefined) container=jQuery('body'); container.find('.slider_container.inited').each(function(){ var slider=jQuery(this); if(slider.parents('div:hidden,article:hidden').length > 0) return; var id=slider.attr('id'); var direction=slider.data('direction'); if(direction!='vertical') direction='horizontal'; var slider_width=slider.width(); var last_width=slider.data('last-width'); if(isNaN(last_width)) last_width=0; if(last_width==0||last_width!=slider_width){ if(direction!='vertical') slider.data('last-width', slider_width); var on_resize=false; var spv=slider.data('slides-per-view'); if(spv==undefined||slider.parents('.widget_nav_menu').length > 0){ spv=1; } if(slider.hasClass('slider_swiper')){ if(TRX_ADDONS_STORAGE['swipers'][id].params.slidesPerView!='auto'){ if(direction=='horizontal'){ var smw=slider.data('slides-min-width'); if(slider_width / spv < smw){ spv=Math.max(1, Math.floor(slider_width / smw)); } if(TRX_ADDONS_STORAGE['swipers'][id].params.slidesPerView!=spv){ TRX_ADDONS_STORAGE['swipers'][id].params.slidesPerView=spv; TRX_ADDONS_STORAGE['swipers'][id].params.loopedSlides=spv; }} on_resize=true; }} if(!slider.hasClass('slider_noresize')||slider.height()==0){ var slide=slider.find('.slider-slide').eq(0); var slide_width=slide.width(); var slide_height=slide.height(); var ratio=slider.data('ratio'); if(ratio===undefined||(''+ratio).indexOf(':')<1){ ratio=slide_height > 0 ? slide_width+':'+slide_height:"16:9"; slider.attr('data-ratio', ratio); } ratio=ratio.split(':'); var ratio_x = !isNaN(ratio[0]) ? Number(ratio[0]):16; var ratio_y = !isNaN(ratio[1]) ? Number(ratio[1]):9; var height=Math.floor((spv==1 ? slider_width:slide_width)/ratio_x*ratio_y); slider.height(height); on_resize=true; if(slider.hasClass('slider_elastistack')){ slider.find('.slider-wrapper,.stack__images,.slider-slide').height(height); } trx_addons_set_controller_height(slider.data('controller'), slider); } if(on_resize&&slider.hasClass('slider_swiper')) TRX_ADDONS_STORAGE['swipers'][id].onResize(); }});} function trx_addons_set_controller_height(controller_id, slider){ var controller=controller_id ? jQuery('#'+controller_id):false; if(controller&&controller.length > 0&&controller.hasClass('sc_slider_controller_vertical')&&controller.hasClass('sc_slider_controller_height_auto')){ if(jQuery(window).width() >=768){ var paddings=parseFloat(controller.css('paddingTop')); if(isNaN(paddings)) paddings=0; controller.find('.slider_container').height(slider.height() - 2*paddings); }else{ var controller_spv=controller.data('slides-per-view'); if(isNaN(controller_spv)) controller_spv=1; controller.find('.slider_container').height(controller_spv*100); }} }})(); jQuery(document).on('action.ready_trx_addons', function(){ "use strict"; if(jQuery('.sc_layouts_cart').length > 0&&!jQuery('body').hasClass('added_to_cart_inited')){ jQuery('body').addClass('added_to_cart_inited'); jQuery(document).on('added_to_cart removed_from_cart', function(){ var total=jQuery('.widget_shopping_cart').eq(0).find('.total .amount').text(); if(total!=undefined){ jQuery('.sc_layouts_cart_summa').text(total); } var cnt=0; jQuery('.widget_shopping_cart_content').eq(0).find('.cart_list li').each(function(){ var q=jQuery(this).find('.quantity').html().split(' ', 2); if(!isNaN(q[0])) cnt +=Number(q[0]); });var items=jQuery('.sc_layouts_cart_items').eq(0).text().split(' ', 2); items[0]=cnt; jQuery('.sc_layouts_cart_items').text(items[0]+' '+items[1]); jQuery('.sc_layouts_cart_items_short').text(items[0]); jQuery('.sc_layouts_cart').data({ 'items': cnt ? cnt:0, 'summa': total ? total:0 });});jQuery(document.body).on('edd_cart_item_added edd_cart_item_removed edd_quantity_updated', function (e, data){ var items=jQuery('.sc_layouts_cart_items').eq(0).text().split(' ', 2); items[0]=data.cart_quantity ? data.cart_quantity:data.quantity; jQuery('.sc_layouts_cart_items').text(items[0]+' '+items[1]); jQuery('.sc_layouts_cart_items_short').text(items[0]); jQuery('.sc_layouts_cart_summa').text(data.total); jQuery('.sc_layouts_cart').data({ 'items': data.cart_quantity ? data.cart_quantity:0, 'summa': data.total ? data.total:0 });});jQuery('.sc_layouts_cart:not(.inited)') .addClass('inited') .on('click', '.sc_layouts_cart_icon,.sc_layouts_cart_details', function(e){ var widget=jQuery(this).siblings('.sc_layouts_cart_widget'), row=jQuery(this).parents('.sc_layouts_row'); if(widget.length > 0&&widget.text().replace(/\s*/g, '')!=''){ row.toggleClass('sc_layouts_row_on_top'); jQuery(this).parents('.sc_layouts_cart').toggleClass('sc_layouts_cart_opened'); jQuery(this).siblings('.sc_layouts_cart_widget').fadeToggle(); } e.preventDefault(); return false; }) .on('click', '.sc_layouts_cart_widget_close', function(e){ jQuery(this).parents('.sc_layouts_row').removeClass('sc_layouts_row_on_top'); jQuery(this).parents('.sc_layouts_cart').removeClass('sc_layouts_cart_opened'); jQuery(this).parent().fadeOut(); e.preventDefault(); return false; });}});jQuery(document).on('action.ready_trx_addons', function(){ "use strict"; jQuery('.sc_layouts_logo,.custom-logo-link').on('click', function(e){ if(jQuery(this).attr('href')=='#'){ trx_addons_document_animate_to(0); e.preventDefault(); return false; }});});(function(){ "use strict"; jQuery(document).on('action.before_ready_trx_addons', function(){ window.trx_addons_init_sfmenu=function(selector){ jQuery(selector).show().each(function(){ var animation_in=jQuery(this).parent().data('animation-in'); if(animation_in==undefined) animation_in="none"; var animation_out=jQuery(this).parent().data('animation-out'); if(animation_out==undefined) animation_out="none"; jQuery(this).addClass('inited').superfish({ delay: 500, animation: { opacity: 'show' }, animationOut: { opacity: 'hide' }, speed: animation_in!='none' ? 500:200, speedOut: animation_out!='none' ? 500:200, autoArrows: false, dropShadows: false, onBeforeShow: function(ul){ if(jQuery(this).parents("ul").length > 1){ var w=jQuery('.page_wrap').length > 0 ? jQuery('.page_wrap').width():jQuery(window).width(); var par_offset=jQuery(this).parents("ul").offset().left; var par_width=jQuery(this).parents("ul").outerWidth(); var ul_width=jQuery(this).outerWidth(); if(par_offset+par_width+ul_width > w-20&&par_offset-ul_width > 0) jQuery(this).addClass('submenu_left'); else jQuery(this).removeClass('submenu_left'); } if(jQuery(this).parents('[class*="columns-"]').length==0&&animation_in!='none'){ jQuery(this).removeClass('animated fast '+animation_out); jQuery(this).addClass('animated fast '+animation_in); }}, onBeforeHide: function(ul){ jQuery(this).find('.trx_addons_video_player.with_cover.video_play').removeClass('video_play').find('.video_embed').empty(); if(jQuery(this).parents('[class*="columns-"]').length==0&&animation_out!='none'){ jQuery(this).removeClass('animated fast '+animation_in); jQuery(this).addClass('animated fast '+animation_out); }}, onShow: function(ul){ if(!jQuery(this).hasClass('layouts_inited')){ jQuery(this).addClass('layouts_inited'); jQuery(document).trigger('action.init_hidden_elements', [jQuery(this)]); }} });});}; trx_addons_init_sfmenu('.sc_layouts_menu:not(.inited) > ul:not(.inited)'); trx_addons_menu_collapse(); jQuery('.sc_layouts_menu:not(.inited)').each(function(){ if(jQuery(this).find('>ul.inited').length==1) jQuery(this).addClass('inited'); });jQuery('.menu_hover_slide_line:not(.slide_inited),.menu_hover_slide_box:not(.slide_inited)').each(function(){ var menu=jQuery(this).addClass('slide_inited'); var style=menu.hasClass('menu_hover_slide_line') ? 'line':'box'; setTimeout(function(){ menu.find('>ul').spasticNav({ style: style, colorOverride: false });}, 500); });jQuery('.sc_layouts_menu_mobile_button_burger:not(.inited)').each(function(){ var burger=jQuery(this); var popup=burger.find('.sc_layouts_menu_popup'); if(popup.length==1){ burger.addClass('inited').on('click', '>a', function(e){ popup.toggleClass('opened').slideToggle(); e.preventDefault(); return false; });jQuery(document).on('click', function(e){ jQuery('.sc_layouts_menu_popup.opened').removeClass('opened').slideUp(); });}});});jQuery(document).on('action.resize_trx_addons', function(){ trx_addons_menu_collapse(); });function trx_addons_menu_collapse(){ if(TRX_ADDONS_STORAGE['menu_collapse']==0) return; jQuery('.sc_layouts_menu:not(.sc_layouts_menu_dir_vertical)').each(function(){ if(jQuery(this).parents('div:hidden,section:hidden,article:hidden').length > 0) return; var ul=jQuery(this).find('>ul:not(.sc_layouts_menu_no_collapse).inited'); if(ul.length==0||ul.find('> li').length < 2) return; var sc_layouts_item=ul.parents('.sc_layouts_item'); if(!sc_layouts_item.parent().hasClass('wpb_wrapper')&&!sc_layouts_item.parent().hasClass('sc_layouts_column')) return; var w_max=sc_layouts_item.parent().width() - (Math.ceil(parseFloat(sc_layouts_item.css('marginLeft'))) + Math.ceil(parseFloat(sc_layouts_item.css('marginRight')))) - 2; var w_siblings=0, in_group=0, ul_id=ul.attr('id'); sc_layouts_item.parent().find('>div').each(function(){ if(in_group > 1) return; if(jQuery(this).hasClass('vc_empty_space')||jQuery(this).hasClass('vc_separator')){ if(in_group==1) in_group=2; else w_siblings=0; }else{ if(jQuery(this).find('#'+ul_id).length > 0) in_group=1; else w_siblings +=(jQuery(this).outerWidth() + Math.ceil(parseFloat(jQuery(this).css('marginLeft'))) + Math.ceil(parseFloat(jQuery(this).css('marginRight')))); }});w_max -=w_siblings; var w_all=0; var move=false; var li_collapse=ul.find('li.menu-item.menu-collapse'); if(li_collapse.length==0){ ul.append(''); li_collapse=ul.find('li.menu-item.menu-collapse'); } var li_collapse_ul=li_collapse.find('> ul'); ul.find('> li').each(function(idx){ var cur_item=jQuery(this); cur_item.data('index', idx); if(move||cur_item.attr('id')=='blob') return; w_all += !cur_item.hasClass('menu-collapse')||cur_item.css('display')!='none' ? cur_item.outerWidth() + Math.ceil(parseFloat(cur_item.css('marginLeft'))) + Math.ceil(parseFloat(cur_item.css('marginRight'))):0; if(w_all > w_max) move=true; });if(move){ w_all=li_collapse.outerWidth() + Math.ceil(parseFloat(li_collapse.css('marginLeft'))) + Math.ceil(parseFloat(li_collapse.css('marginRight'))); ul.find("> li:not('.menu-collapse')").each(function(idx){ var cur_item=jQuery(this); var cur_width=cur_item.outerWidth() + Math.ceil(parseFloat(cur_item.css('marginLeft'))) + Math.ceil(parseFloat(cur_item.css('marginRight'))); if(w_all <=w_max) w_all +=cur_width; if(w_all > w_max){ var moved=false; li_collapse_ul.find('>li').each(function(){ if(!moved&&Number(jQuery(this).data('index')) > idx){ cur_item.attr('data-width', cur_width).insertBefore(jQuery(this)); moved=true; }});if(!moved) cur_item.attr('data-width', cur_width).appendTo(li_collapse_ul); }});li_collapse.show(); }else{ var items=li_collapse_ul.find('>li'); var cnt=0; move=true; items.each(function(){ if(!move) return; if(items.length - cnt==1) w_all -=(li_collapse.outerWidth() + Math.ceil(parseFloat(li_collapse.css('marginLeft'))) + Math.ceil(parseFloat(li_collapse.css('marginRight')))); w_all +=parseFloat(jQuery(this).data('width')); if(w_all < w_max){ jQuery(this).insertBefore(li_collapse); cnt++; } else move=false; });if(items.length - cnt==0) li_collapse.hide(); }});}})();(function($){ "use strict"; $.fn.spasticNav=function(options){ options=$.extend({ overlap:0, style: 'box', reset:50, color:'#00c6ff', colorOverride: true, }, options); return this.each(function(){ var nav=$(this), currentPageItem=nav.find('>.current-menu-item,>.current-menu-parent,>.current-menu-ancestor'), hidden=false, blob, reset; if(currentPageItem.length===0){ currentPageItem=nav.find('li').eq(0); hidden=true; } var a=currentPageItem.find('>a'); var pl=parseInt(a.css('paddingLeft'), 10); if(isNaN(pl)) pl=0; $('
  • ').css({ width:options.style=='box' ? a.outerWidth():a.width(), left:currentPageItem.position().left + (options.style=='box' ? 0:pl), top:currentPageItem.position().top - options.overlap / 2, opacity: hidden ? 0:1 }).appendTo(this); blob=$('#blob', nav); if(options.style=='box') blob.css({height: currentPageItem.outerHeight() + options.overlap});if(options.colorOverride){ var bg=a.css('backgroundColor'); blob.css({backgroundColor:hidden||bg=='transparent' ? options.color:bg});} nav.find('>li:not(#blob)').hover(function(){ clearTimeout(reset); var a=$(this).find('>a'); var pl=parseInt(a.css('paddingLeft'), 10); if(isNaN(pl)) pl=0; if(options.colorOverride){ var bg=a.css('backgroundColor'); if(bg!='transparent') blob.css({backgroundColor: bg});} $(this).addClass('blob_over'); blob.css({ left: $(this).position().left + (options.style=='box' ? 0:pl), top: $(this).position().top - options.overlap / 2, width: options.style=='box' ? a.outerWidth():a.width(), opacity: 1 });}, function(){ reset=setTimeout(function(){ var a=currentPageItem.find('>a'); var pl=parseInt(a.css('paddingLeft'), 10); if(isNaN(pl)) pl=0; if(options.colorOverride){ var bg=a.css('backgroundColor'); if(bg!='transparent') blob.css({backgroundColor: bg});} blob.css({ width: options.style=='box' ? a.outerWidth():a.width(), left: currentPageItem.position().left + (options.style=='box' ? 0:pl), opacity: hidden ? 0:1, });}, options.reset); $(this).removeClass('blob_over'); }); });};})(jQuery); jQuery(document).on('action.ready_trx_addons', function(){ "use strict"; if(jQuery('.search_wrap:not(.inited)').length > 0){ jQuery('.search_wrap:not(.inited)').each(function(){ var search_wrap=jQuery(this).addClass('inited'); var search_field=search_wrap.find('.search_field'); var ajax_timer=null; search_field.on('keyup', function(e){ if(e.keyCode==27){ search_field.val(''); trx_addons_search_close(search_wrap); e.preventDefault(); return; } if(search_wrap.hasClass('search_ajax')){ var s=search_field.val(); if(ajax_timer){ clearTimeout(ajax_timer); ajax_timer=null; } if(s.length >=4){ ajax_timer=setTimeout(function(){ jQuery.post(TRX_ADDONS_STORAGE['ajax_url'], { action: 'ajax_search', nonce: TRX_ADDONS_STORAGE['ajax_nonce'], text: s }).done(function(response){ clearTimeout(ajax_timer); ajax_timer=null; var rez={}; if(response==''||response==0){ rez={ error: TRX_ADDONS_STORAGE['msg_search_error'] };}else{ try { rez=JSON.parse(response); } catch (e){ rez={ error: TRX_ADDONS_STORAGE['msg_search_error'] }; console.log(response); }} var msg=rez.error==='' ? rez.data:rez.error; search_field.parents('.search_ajax').find('.search_results_content').empty().append(msg); search_field.parents('.search_ajax').find('.search_results').fadeIn(); });}, 500); }} });search_wrap.find('.search_submit').on('click', function(e){ if((search_wrap.hasClass('search_style_expand')||search_wrap.hasClass('search_style_fullscreen'))&&!search_wrap.hasClass('search_opened')){ search_wrap.addClass('search_opened'); setTimeout(function(){ search_field.get(0).focus(); }, 500); }else if(search_field.val()==''){ if(search_wrap.hasClass('search_opened')) trx_addons_search_close(search_wrap); else search_field.get(0).focus(); }else{ search_wrap.find('form').get(0).submit(); } e.preventDefault(); return false; });search_wrap.find('.search_close').on('click', function(e){ trx_addons_search_close(search_wrap); e.preventDefault(); return false; });search_wrap.find('.search_results_close').on('click', function(e){ jQuery(this).parent().fadeOut(); e.preventDefault(); return false; });search_wrap.on('click', '.search_more', function(e){ if(search_field.val()!='') search_wrap.find('form').get(0).submit(); e.preventDefault(); return false; });});} function trx_addons_search_close(search_wrap){ search_wrap.removeClass('search_opened'); search_wrap.find('.search_results').fadeOut(); }}); ;!function(a,b){"use strict";var c=function(){var c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},d=function(){var b=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);return b&&a("html").css("cursor","pointer").on("click",a.noop),b}(),e=function(){var a=document.documentElement.style;return"behavior"in a&&"fill"in a&&/iemobile/i.test(navigator.userAgent)}(),f=function(){return!!b.PointerEvent}(),g=function(a,b,d){var e,f=c.menuClass;b.cssArrows&&(f+=" "+c.menuArrowClass),e=d?"addClass":"removeClass",a[e](f)},h=function(b,d){return b.find("li."+d.pathClass).slice(0,d.pathLevels).addClass(d.hoverClass+" "+c.bcClass).filter(function(){return a(this).children(d.popUpSelector).hide().show().length}).removeClass(d.pathClass)},i=function(a,b){var d=b?"addClass":"removeClass";a.children("a")[d](c.anchorClass)},j=function(a){var b=a.css("ms-touch-action"),c=a.css("touch-action");c=c||b,c="pan-y"===c?"auto":"pan-y",a.css({"ms-touch-action":c,"touch-action":c})},k=function(a){return a.closest("."+c.menuClass)},l=function(a){return k(a).data("sfOptions")},m=function(){var b=a(this),c=l(b);clearTimeout(c.sfTimer),b.siblings().superfish("hide").end().superfish("show")},n=function(b){b.retainPath=a.inArray(this[0],b.$path)>-1,this.superfish("hide"),this.parents("."+b.hoverClass).length||(b.onIdle.call(k(this)),b.$path.length&&a.proxy(m,b.$path)())},o=function(){var b=a(this),c=l(b);d?a.proxy(n,b,c)():(clearTimeout(c.sfTimer),c.sfTimer=setTimeout(a.proxy(n,b,c),c.delay))},p=function(b){var c=a(this),d=l(c),e=c.siblings(b.data.popUpSelector);return d.onHandleTouch.call(e)===!1?this:void(e.length>0&&e.is(":hidden")&&(c.one("click.superfish",!1),"MSPointerDown"===b.type||"pointerdown"===b.type?c.trigger("focus"):a.proxy(m,c.parent("li"))()))},q=function(b,c){var g="li:has("+c.popUpSelector+")";a.fn.hoverIntent&&!c.disableHI?b.hoverIntent(m,o,g):b.on("mouseenter.superfish",g,m).on("mouseleave.superfish",g,o);var h="MSPointerDown.superfish";f&&(h="pointerdown.superfish"),d||(h+=" touchend.superfish"),e&&(h+=" mousedown.superfish"),b.on("focusin.superfish","li",m).on("focusout.superfish","li",o).on(h,"a",c,p)};return{hide:function(b){if(this.length){var c=this,d=l(c);if(!d)return this;var e=d.retainPath===!0?d.$path:"",f=c.find("li."+d.hoverClass).add(this).not(e).removeClass(d.hoverClass).children(d.popUpSelector),g=d.speedOut;if(b&&(f.show(),g=0),d.retainPath=!1,d.onBeforeHide.call(f)===!1)return this;f.stop(!0,!0).animate(d.animationOut,g,function(){var b=a(this);d.onHide.call(b)})}return this},show:function(){var a=l(this);if(!a)return this;var b=this.addClass(a.hoverClass),c=b.children(a.popUpSelector);return a.onBeforeShow.call(c)===!1?this:(c.stop(!0,!0).animate(a.animation,a.speed,function(){a.onShow.call(c)}),this)},destroy:function(){return this.each(function(){var b,d=a(this),e=d.data("sfOptions");return e?(b=d.find(e.popUpSelector).parent("li"),clearTimeout(e.sfTimer),g(d,e),i(b),j(d),d.off(".superfish").off(".hoverIntent"),b.children(e.popUpSelector).attr("style",function(a,b){return b.replace(/display[^;]+;?/g,"")}),e.$path.removeClass(e.hoverClass+" "+c.bcClass).addClass(e.pathClass),d.find("."+e.hoverClass).removeClass(e.hoverClass),e.onDestroy.call(d),void d.removeData("sfOptions")):!1})},init:function(b){return this.each(function(){var d=a(this);if(d.data("sfOptions"))return!1;var e=a.extend({},a.fn.superfish.defaults,b),f=d.find(e.popUpSelector).parent("li");e.$path=h(d,e),d.data("sfOptions",e),g(d,e,!0),i(f,!0),j(d),q(d,e),f.not("."+c.bcClass).superfish("hide",!0),e.onInit.call(this)})}}}();a.fn.superfish=function(b,d){return c[b]?c[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?a.error("Method "+b+" does not exist on jQuery.fn.superfish"):c.init.apply(this,arguments)},a.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:a.noop,onBeforeShow:a.noop,onShow:a.noop,onBeforeHide:a.noop,onHide:a.noop,onIdle:a.noop,onDestroy:a.noop,onHandleTouch:a.noop}}(jQuery,window); (function (global){ "use strict"; global.Bideo=function (){ this.opt=null; this.videoEl=null; this.approxLoadingRate=null; this._resize=null; this._progress=null; this.startTime=null; this.onLoadCalled=false; this.init=function (opt){ this.opt=opt=opt||{}; var self=this; self._resize=self.resize.bind(this); self.videoEl=opt.videoEl; self.videoEl.addEventListener('loadedmetadata', self._resize, false); self.videoEl.addEventListener('canplay', function (){ if(!self.opt.isMobile){ self.opt.onLoad&&self.opt.onLoad(); if(self.opt.autoplay!==false) self.videoEl.play(); }});if(self.opt.resize){ global.addEventListener('resize', self._resize, false); } this.startTime=(new Date()).getTime(); this.opt.src.forEach(function (srcOb, i, arr){ var key , val , source=document.createElement('source'); for (key in srcOb){ if(srcOb.hasOwnProperty(key)){ val=srcOb[key]; source.setAttribute(key, val); }} self.videoEl.appendChild(source); });if(self.opt.isMobile){ if(self.opt.playButton){ self.opt.videoEl.addEventListener('timeupdate', function (){ if(!self.onLoadCalled){ self.opt.onLoad&&self.opt.onLoad(); self.onLoadCalled=true; }});self.opt.playButton.addEventListener('click', function (){ self.opt.pauseButton.style.display='inline-block'; this.style.display='none'; self.videoEl.play(); }, false); self.opt.pauseButton.addEventListener('click', function (){ this.style.display='none'; self.opt.playButton.style.display='inline-block'; self.videoEl.pause(); }, false); }} return; }; this.resize=function (){ if('object-fit' in document.body.style) return; var w=this.videoEl.videoWidth , h=this.videoEl.videoHeight; var videoRatio=(w / h).toFixed(2); var container=this.opt.container , containerStyles=global.getComputedStyle(container) , minW=parseInt(containerStyles.getPropertyValue('width')) , minH=parseInt(containerStyles.getPropertyValue('height')); if(containerStyles.getPropertyValue('box-sizing')!=='border-box'){ var paddingTop=containerStyles.getPropertyValue('padding-top') , paddingBottom=containerStyles.getPropertyValue('padding-bottom') , paddingLeft=containerStyles.getPropertyValue('padding-left') , paddingRight=containerStyles.getPropertyValue('padding-right'); paddingTop=parseInt(paddingTop); paddingBottom=parseInt(paddingBottom); paddingLeft=parseInt(paddingLeft); paddingRight=parseInt(paddingRight); minW +=paddingLeft + paddingRight; minH +=paddingTop + paddingBottom; } var widthRatio=minW / w; var heightRatio=minH / h; if(widthRatio > heightRatio){ var new_width=minW; var new_height=Math.ceil(new_width / videoRatio); }else{ var new_height=minH; var new_width=Math.ceil(new_height * videoRatio); } this.videoEl.style.width=new_width + 'px'; this.videoEl.style.height=new_height + 'px'; };}; }(window)); ;(function ($, window){ var defaults={ ratio: 16/9, videoId: 'ZCAnLxRvNNc', mute: true, repeat: true, width: $(window).width(), wrapperZIndex: 99, playButtonClass: 'tubular-play', pauseButtonClass: 'tubular-pause', muteButtonClass: 'tubular-mute', volumeUpClass: 'tubular-volume-up', volumeDownClass: 'tubular-volume-down', increaseVolumeBy: 10, start: 0 }; var tubular=function(node, options){ var options=$.extend({}, defaults, options), $body=$('body'), $node=$(node); var tubularContainer='
    '; $('html,body').css({'width': '100%', 'height': '100%'});$body.prepend(tubularContainer); $node.css({position: 'relative', 'z-index': options.wrapperZIndex});window.player; window.onYouTubeIframeAPIReady=function(){ player=new YT.Player('tubular-player', { width: options.width, height: Math.ceil(options.width / options.ratio), videoId: options.videoId, playerVars: { controls: 0, showinfo: 0, modestbranding: 1, wmode: 'transparent' }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange }});}; window.onPlayerReady=function(e){ resize(); if(options.mute) e.target.mute(); e.target.seekTo(options.start); e.target.playVideo(); }; window.onPlayerStateChange=function(state){ if(state.data===0&&options.repeat){ player.seekTo(options.start); }}; var resize=function(){ var width=$(window).width(), pWidth, height=$(window).height(), pHeight, $tubularPlayer=$('#tubular-player'); if(width / options.ratio < height){ pWidth=Math.ceil(height * options.ratio); $tubularPlayer.width(pWidth).height(height).css({left: (width - pWidth) / 2, top: 0});}else{ pHeight=Math.ceil(width / options.ratio); $tubularPlayer.width(width).height(pHeight).css({left: 0, top: (height - pHeight) / 2});}}; $(window).on('resize.tubular', function(){ resize(); });$('body').on('click','.' + options.playButtonClass, function(e){ e.preventDefault(); player.playVideo(); }).on('click', '.' + options.pauseButtonClass, function(e){ e.preventDefault(); player.pauseVideo(); }).on('click', '.' + options.muteButtonClass, function(e){ e.preventDefault(); (player.isMuted()) ? player.unMute():player.mute(); }).on('click', '.' + options.volumeDownClass, function(e){ e.preventDefault(); var currentVolume=player.getVolume(); if(currentVolume < options.increaseVolumeBy) currentVolume=options.increaseVolumeBy; player.setVolume(currentVolume - options.increaseVolumeBy); }).on('click', '.' + options.volumeUpClass, function(e){ e.preventDefault(); if(player.isMuted()) player.unMute(); var currentVolume=player.getVolume(); if(currentVolume > 100 - options.increaseVolumeBy) currentVolume=100 - options.increaseVolumeBy; player.setVolume(currentVolume + options.increaseVolumeBy); });}; var tag=document.createElement('script'); tag.src="//www.youtube.com/iframe_api"; var firstScriptTag=document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); $.fn.tubular=function (options){ return this.each(function (){ if(!$.data(this, 'tubular_instantiated')){ $.data(this, 'tubular_instantiated', tubular(this, options)); }});};})(jQuery, window); (function(){ "use strict"; if(typeof FILMAX_STORAGE=='undefined') window.FILMAX_STORAGE={}; window.filmax_storage_get=function(var_name){ return filmax_isset(FILMAX_STORAGE[var_name]) ? FILMAX_STORAGE[var_name]:''; }; window.filmax_storage_set=function(var_name, value){ FILMAX_STORAGE[var_name]=value; }; window.filmax_storage_inc=function(var_name){ var value=arguments[1]===undefined ? 1:arguments[1]; FILMAX_STORAGE[var_name] +=value; }; window.filmax_storage_concat=function(var_name, value){ FILMAX_STORAGE[var_name] +=''+value; }; window.filmax_storage_get_array=function(var_name, key){ return filmax_isset(FILMAX_STORAGE[var_name][key]) ? FILMAX_STORAGE[var_name][key]:''; }; window.filmax_storage_set_array=function(var_name, key, value){ if(!filmax_isset(FILMAX_STORAGE[var_name])) FILMAX_STORAGE[var_name]={}; FILMAX_STORAGE[var_name][key]=value; }; window.filmax_storage_inc_array=function(var_name, key){ var value=arguments[2]===undefined ? 1:arguments[2]; FILMAX_STORAGE[var_name][key] +=value; }; window.filmax_storage_concat_array=function(var_name, key, value){ FILMAX_STORAGE[var_name][key] +=''+value; }; window.filmax_isset=function(obj){ return typeof(obj)!='undefined'; }; window.filmax_empty=function(obj){ return typeof(obj)=='undefined'||(typeof(obj)=='object'&&obj==null)||(typeof(obj)=='array'&&obj.length==0)||(typeof(obj)=='string'&&filmax_alltrim(obj)=='')||obj===0; }; window.filmax_is_array=function(obj){ return typeof(obj)=='array'; }; window.filmax_is_object=function(obj){ return typeof(obj)=='object'; }; window.filmax_clone_object=function(obj){ if(obj==null||typeof(obj)!='object'){ return obj; } var temp={}; for (var key in obj){ temp[key]=filmax_clone_object(obj[key]); } return temp; }; window.filmax_merge_objects=function(obj1, obj2){ for (var i in obj2) obj1[i]=obj2[i]; return obj1; }; window.filmax_serialize=function(mixed_val){ var obj_to_array=arguments.length==1||argument[1]===true; switch (typeof(mixed_val)){ case "number": if(isNaN(mixed_val)||!isFinite(mixed_val)) return false; else return (Math.floor(mixed_val)==mixed_val ? "i":"d") + ":" + mixed_val + ";"; case "string": return "s:" + mixed_val.length + ":\"" + mixed_val + "\";"; case "boolean": return "b:" + (mixed_val ? "1":"0") + ";"; case "object": if(mixed_val==null) return "N;"; else if(mixed_val instanceof Array){ var idxobj={ idx: -1 }; var map=[]; for (var i=0; i < mixed_val.length; i++){ idxobj.idx++; var ser=filmax_serialize(mixed_val[i]); if(ser) map.push(filmax_serialize(idxobj.idx) + ser); } return "a:" + mixed_val.length + ":{" + map.join("") + "}"; }else{ var class_name=filmax_get_class(mixed_val); if(class_name==undefined) return false; var props=new Array(); for (var prop in mixed_val){ var ser=filmax_serialize(mixed_val[prop]); if(ser) props.push(filmax_serialize(prop) + ser); } if(obj_to_array) return "a:" + props.length + ":{" + props.join("") + "}"; else return "O:" + class_name.length + ":\"" + class_name + "\":" + props.length + ":{" + props.join("") + "}"; } case "undefined": return "N;"; } return false; }; window.filmax_get_class=function(obj){ if(obj instanceof Object&&!(obj instanceof Array)&&!(obj instanceof Function)&&obj.constructor){ var arr=obj.constructor.toString().match(/function\s*(\w+)/); if(arr&&arr.length==2) return arr[1]; } return false; }; window.filmax_in_list=function(str, list){ var delim=arguments[2]!==undefined ? arguments[2]:'|'; var icase=arguments[3]!==undefined ? arguments[3]:true; var retval=false; if(icase){ if(typeof(str)=='string') str=str.toLowerCase(); list=list.toLowerCase(); } var parts=list.split(delim); for (var i=0; i < parts.length; i++){ if(parts[i]==str){ retval=true; break; }} return retval; }; window.filmax_alltrim=function(str){ var dir=arguments[1]!==undefined ? arguments[1]:'a'; var rez=''; var i, start=0, end=str.length-1; if(dir=='a'||dir=='l'){ for (i=0; i < str.length; i++){ if(str.substr(i,1)!=' '){ start=i; break; }} } if(dir=='a'||dir=='r'){ for (i=str.length-1; i >=0; i--){ if(str.substr(i,1)!=' '){ end=i; break; }} } return str.substring(start, end+1); }; window.filmax_ltrim=function(str){ return filmax_alltrim(str, 'l'); }; window.filmax_rtrim=function(str){ return filmax_alltrim(str, 'r'); }; window.filmax_padl=function(str, len){ var ch=arguments[2]!==undefined ? arguments[2]:' '; var rez=str.substr(0,len); if(rez.length < len){ for (var i=0; i < len-str.length; i++) rez +=ch; } return rez; }; window.filmax_padr=function(str, len){ var ch=arguments[2]!==undefined ? arguments[2]:' '; var rez=str.substr(0,len); if(rez.length < len){ for (var i=0; i < len-str.length; i++) rez=ch + rez; } return rez; }; window.filmax_padc=function(str, len){ var ch=arguments[2]!==undefined ? arguments[2]:' '; var rez=str.substr(0,len); if(rez.length < len){ for (var i=0; i < Math.floor((len-str.length)/2); i++) rez=ch + rez + ch; } return rez+(rez.length") .replace(/\}\}/g, "") .replace(/\(\(/g, "") .replace(/\)\)/g, "") .replace(/\|\|/g, "
    "); }; window.filmax_round_number=function(num){ var precision=arguments[1]!==undefined ? arguments[1]:0; var p=Math.pow(10, precision); return Math.round(num*p)/p; }; window.filmax_clear_number=function(num){ var precision=arguments[1]!==undefined ? arguments[1]:0; var defa=arguments[2]!==undefined ? arguments[2]:0; var res=''; var decimals=-1; num=""+num; if(num=="") num=""+defa; for (var i=0; i < num.length; i++){ if(decimals==0) break; else if(decimals>0) decimals--; var ch=num.substr(i,1); if(ch=='.'){ if(precision>0){ res +=ch; } decimals=precision; }else if((ch>=0&&ch<=9)||(ch=='-'&&i==0)) res+=ch; } if(precision>0&&decimals!=0){ if(decimals==-1){ res +='.'; decimals=precision; } for (i=decimals; i > 0; i--) res +='0'; } return res; }; window.filmax_dec2hex=function(n){ return Number(n).toString(16); }; window.filmax_hex2dec=function(hex){ return parseInt(hex,16); }; window.filmax_in_array=function(val, thearray){ var rez=false; for (var i=0; i < thearray.length-1; i++){ if(thearray[i]==val){ rez=true; break; }} return rez; }; window.filmax_sort_array=function(thearray){ var caseSensitive=arguments[1]!==undefined ? arguments[1]:false; var tmp=''; for (var x=0; x < thearray.length-1; x++){ for (var y=(x+1); y < thearray.length; y++){ if(caseSensitive){ if(thearray[x] > thearray[y]){ tmp=thearray[x]; thearray[x]=thearray[y]; thearray[y]=tmp; }}else{ if(thearray[x].toLowerCase() > thearray[y].toLowerCase()){ tmp=thearray[x]; thearray[x]=thearray[y]; thearray[y]=tmp; }} }} return thearray; }; window.filmax_parse_date=function(dt){ dt=dt.replace(/\//g, '-').replace(/\./g, '-').replace(/T/g, ' ').split('+')[0]; var dt2=dt.split(' '); var d=dt2[0].split('-'); var t=dt2[1].split(':'); d.push(t[0], t[1], t[2]); return d; }; window.filmax_get_date_difference=function(dt1){ var dt2=arguments[1]!==undefined ? arguments[1]:''; var short_date=arguments[2]!==undefined ? arguments[2]:true; var sec=arguments[3]!==undefined ? arguments[3]:false; var a1=filmax_parse_date(dt1); dt1=Date.UTC(a1[0], a1[1], a1[2], a1[3], a1[4], a1[5]); if(dt2==''){ dt2=new Date(); var a2=[dt2.getFullYear(), dt2.getMonth()+1, dt2.getDate(), dt2.getHours(), dt2.getMinutes(), dt2.getSeconds()]; } else var a2=filmax_parse_date(dt2); dt2=Date.UTC(a2[0], a2[1], a2[2], a2[3], a2[4], a2[5]); var diff=Math.round((dt2 - dt1)/1000); var days=Math.floor(diff / (24*3600)); diff -=days * 24 * 3600; var hours=Math.floor(diff / 3600); diff -=hours * 3600; var minutes=Math.floor(diff / 60); diff -=minutes * 60; var rez=''; if(days > 0) rez +=(rez!='' ? ' ':'') + days + ' day' + (days > 1 ? 's':''); if((!short_date||rez=='')&&hours > 0) rez +=(rez!='' ? ' ':'') + hours + ' hour' + (hours > 1 ? 's':''); if((!short_date||rez=='')&&minutes > 0) rez +=(rez!='' ? ' ':'') + minutes + ' minute' + (minutes > 1 ? 's':''); if(sec||rez=='') rez +=rez!=''||sec ? (' ' + diff + ' second' + (diff > 1 ? 's':'')):'less then minute'; return rez; }; window.filmax_hex2rgb=function(hex){ hex=parseInt(((hex.indexOf('#') > -1) ? hex.substring(1):hex), 16); return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};}; window.filmax_hex2rgba=function(hex, alpha){ var rgb=filmax_hex2rgb(hex); return 'rgba('+rgb.r+','+rgb.g+','+rgb.b+','+alpha+')'; }; window.filmax_rgb2hex=function(color){ var aRGB; color=color.replace(/\s/g,"").toLowerCase(); if(color=='rgba(0,0,0,0)'||color=='rgba(0%,0%,0%,0%)') color='transparent'; if(color.indexOf('rgba(')==0) aRGB=color.match(/^rgba\((\d{1,3}[%]?),(\d{1,3}[%]?),(\d{1,3}[%]?),(\d{1,3}[%]?)\)$/i); else aRGB=color.match(/^rgb\((\d{1,3}[%]?),(\d{1,3}[%]?),(\d{1,3}[%]?)\)$/i); if(aRGB){ color=''; for (var i=1; i <=3; i++) color +=Math.round((aRGB[i][aRGB[i].length-1]=="%"?2.55:1)*parseInt(aRGB[i])).toString(16).replace(/^(.)$/,'0$1'); } else color=color.replace(/^#?([\da-f])([\da-f])([\da-f])$/i, '$1$1$2$2$3$3'); return (color.substr(0,1)!='#' ? '#':'') + color; }; window.filmax_components2hex=function(r,g,b){ return '#'+ Number(r).toString(16).toUpperCase().replace(/^(.)$/,'0$1') + Number(g).toString(16).toUpperCase().replace(/^(.)$/,'0$1') + Number(b).toString(16).toUpperCase().replace(/^(.)$/,'0$1'); }; window.filmax_rgb2components=function(color){ color=filmax_rgb2hex(color); var matches=color.match(/^#?([\dabcdef]{2})([\dabcdef]{2})([\dabcdef]{2})$/i); if(!matches) return false; for (var i=1, rgb=new Array(3); i <=3; i++) rgb[i-1]=parseInt(matches[i],16); return rgb; }; window.filmax_hex2hsb=function(hex){ var h=arguments[1]!==undefined ? arguments[1]:0; var s=arguments[2]!==undefined ? arguments[2]:0; var b=arguments[3]!==undefined ? arguments[3]:0; var hsb=filmax_rgb2hsb(filmax_hex2rgb(hex)); hsb.h=Math.min(359, hsb.h + h); hsb.s=Math.min(100, hsb.s + s); hsb.b=Math.min(100, hsb.b + b); return hsb; }; window.filmax_hsb2hex=function(hsb){ var rgb=filmax_hsb2rgb(hsb); return filmax_components2hex(rgb.r, rgb.g, rgb.b); }; window.filmax_rgb2hsb=function(rgb){ var hsb={}; hsb.b=Math.max(Math.max(rgb.r,rgb.g),rgb.b); hsb.s=(hsb.b <=0) ? 0:Math.round(100*(hsb.b - Math.min(Math.min(rgb.r,rgb.g),rgb.b))/hsb.b); hsb.b=Math.round((hsb.b /255)*100); if((rgb.r==rgb.g)&&(rgb.g==rgb.b)) hsb.h=0; else if(rgb.r>=rgb.g&&rgb.g>=rgb.b) hsb.h=60*(rgb.g-rgb.b)/(rgb.r-rgb.b); else if(rgb.g>=rgb.r&&rgb.r>=rgb.b) hsb.h=60 + 60*(rgb.g-rgb.r)/(rgb.g-rgb.b); else if(rgb.g>=rgb.b&&rgb.b>=rgb.r) hsb.h=120 + 60*(rgb.b-rgb.r)/(rgb.g-rgb.r); else if(rgb.b>=rgb.g&&rgb.g>=rgb.r) hsb.h=180 + 60*(rgb.b-rgb.g)/(rgb.b-rgb.r); else if(rgb.b>=rgb.r&&rgb.r>=rgb.g) hsb.h=240 + 60*(rgb.r-rgb.g)/(rgb.b-rgb.g); else if(rgb.r>=rgb.b&&rgb.b>=rgb.g) hsb.h=300 + 60*(rgb.r-rgb.b)/(rgb.r-rgb.g); else hsb.h=0; hsb.h=Math.round(hsb.h); return hsb; }; window.filmax_hsb2rgb=function(hsb){ var rgb={}; var h=Math.round(hsb.h); var s=Math.round(hsb.s*255/100); var v=Math.round(hsb.b*255/100); if(s==0){ rgb.r=rgb.g=rgb.b=v; }else{ var t1=v; var t2=(255-s)*v/255; var t3=(t1-t2)*(h%60)/60; if(h==360) h=0; if(h<60){ rgb.r=t1; rgb.b=t2; rgb.g=t2+t3; }else if(h<120){ rgb.g=t1; rgb.b=t2; rgb.r=t1-t3; }else if(h<180){ rgb.g=t1; rgb.r=t2; rgb.b=t2+t3; }else if(h<240){ rgb.b=t1; rgb.r=t2; rgb.g=t1-t3; }else if(h<300){ rgb.b=t1; rgb.g=t2; rgb.r=t2+t3; }else if(h<360){ rgb.r=t1; rgb.g=t2; rgb.b=t1-t3; }else{ rgb.r=0; rgb.g=0; rgb.b=0; }} return { r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b) };}; window.filmax_color_picker=function(){ var id=arguments[0]!==undefined ? arguments[0]:"iColorPicker"+Math.round(Math.random()*1000); var colors=arguments[1]!==undefined ? arguments[1]:'#f00,#ff0,#0f0,#0ff,#00f,#f0f,#fff,#ebebeb,#e1e1e1,#d7d7d7,#cccccc,#c2c2c2,#b7b7b7,#acacac,#a0a0a0,#959595,' +'#ee1d24,#fff100,#00a650,#00aeef,#2f3192,#ed008c,#898989,#7d7d7d,#707070,#626262,#555,#464646,#363636,#262626,#111,#000,' +'#f7977a,#fbad82,#fdc68c,#fff799,#c6df9c,#a4d49d,#81ca9d,#7bcdc9,#6ccff7,#7ca6d8,#8293ca,#8881be,#a286bd,#bc8cbf,#f49bc1,#f5999d,' +'#f16c4d,#f68e54,#fbaf5a,#fff467,#acd372,#7dc473,#39b778,#16bcb4,#00bff3,#438ccb,#5573b7,#5e5ca7,#855fa8,#a763a9,#ef6ea8,#f16d7e,' +'#ee1d24,#f16522,#f7941d,#fff100,#8fc63d,#37b44a,#00a650,#00a99e,#00aeef,#0072bc,#0054a5,#2f3192,#652c91,#91278f,#ed008c,#ee105a,' +'#9d0a0f,#a1410d,#a36209,#aba000,#588528,#197b30,#007236,#00736a,#0076a4,#004a80,#003370,#1d1363,#450e61,#62055f,#9e005c,#9d0039,' +'#790000,#7b3000,#7c4900,#827a00,#3e6617,#045f20,#005824,#005951,#005b7e,#003562,#002056,#0c004b,#30004a,#4b0048,#7a0045,#7a0026'; var colorsList=colors.split(','); var tbl=''; for (var i=0; i < colorsList.length; i++){ if(i%16==0) tbl +=(i>0 ? '':'') + ''; tbl +=''; } tbl +='' + '' + '' + '' + '
     
    ' + '' + '' + '' + '' + '
    '; jQuery(document.createElement("div")) .attr("id", id) .css('display','none') .html(tbl) .appendTo("body") .addClass("iColorPickerTable") .on('mouseover', 'thead td', function(){ var aaa=filmax_rgb2hex(jQuery(this).css('background-color')); jQuery('#'+id+'_colorPreview').css('background',aaa); jQuery('#'+id+'_colorPreview input').val(aaa); }) .on('keypress', '#'+id+'_colorPreview input', function(key){ var aaa=jQuery(this).val(); if(aaa.length<7&&((key.which>=48&&key.which<=57)||(key.which>=97&&key.which<=102)||(key.which===35||aaa.length===0))){ aaa +=String.fromCharCode(key.which); }else if(key.which==8&&aaa.length>0){ aaa=aaa.substring(0, aaa.length-1); }else if(key.which===13&&(aaa.length===4||aaa.length===7)){ var fld=jQuery('#'+id).data('field'); var func=jQuery('#'+id).data('func'); if(func!=null&&func!='undefined'){ func(fld, aaa); }else{ fld.val(aaa).css('backgroundColor', aaa).trigger('change'); } jQuery('#'+id+'_Bg').fadeOut(500); jQuery('#'+id).fadeOut(500); }else{ key.preventDefault(); return false; } if(aaa.substr(0,1)==='#'&&(aaa.length===4||aaa.length===7)){ jQuery('#'+id+'_colorPreview').css('background',aaa); }}) .on('click', 'thead td', function(e){ var fld=jQuery('#'+id).data('field'); var func=jQuery('#'+id).data('func'); var aaa=filmax_rgb2hex(jQuery(this).css('background-color')); if(func!=null&&func!='undefined'){ func(fld, aaa); }else{ fld.val(aaa).css('backgroundColor', aaa).trigger('change'); } jQuery('#'+id+'_Bg').fadeOut(500); jQuery('#'+id).fadeOut(500); e.preventDefault(); return false; }) .on('click', 'tbody .iColorPicker_moreColors', function(e){ var thead=jQuery(this).parents('table').find('thead'); var out=''; if(thead.hasClass('more_colors')){ for (var i=0; i < colorsList.length; i++){ if(i%16==0) out +=(i>0 ? '':'') + ''; out +=' '; } thead.removeClass('more_colors').empty().html(out+''); jQuery('#'+id+'_colorPreview').attr('colspan', 8); jQuery('#'+id+'_colorOriginal').attr('colspan', 8); }else{ var rgb=[0,0,0], i=0, j=-1; while (rgb[0]<0xF||rgb[1]<0xF||rgb[2]<0xF){ if(i%18==0) out +=(i>0 ? '':'') + ''; i++; out +=' '; rgb[2]+=3; if(rgb[2]>0xF){ rgb[1]+=3; if(rgb[1]>(j===0 ? 6:0xF)){ rgb[0]+=3; if(rgb[0]>0xF){ if(j===0){ j=1; rgb[0]=0; rgb[1]=9; rgb[2]=0; }else{ break; }}else{ rgb[1]=(j < 1 ? 0:9); rgb[2]=0; }}else{ rgb[2]=0; }} } thead.addClass('more_colors').empty().html(out+' '); jQuery('#'+id+'_colorPreview').attr('colspan', 9); jQuery('#'+id+'_colorOriginal').attr('colspan', 9); } jQuery('#'+id+' table.colorPickerTable thead td') .css({ 'width':'12px', 'height':'14px', 'border':'1px solid #000', 'cursor':'pointer' });e.preventDefault(); return false; });jQuery(document.createElement("div")) .attr("id", id+"_Bg") .on('click', function(e){ jQuery("#"+id+"_Bg").fadeOut(500); jQuery("#"+id).fadeOut(500); e.preventDefault(); return false; }) .appendTo("body"); jQuery('#'+id+' table.colorPickerTable thead td') .css({ 'width':'12px', 'height':'14px', 'border':'1px solid #000', 'cursor':'pointer' });jQuery('#'+id+' table.colorPickerTable') .css({'border-collapse':'collapse'});jQuery('#'+id) .css({ 'border':'1px solid #ccc', 'background':'#333', 'padding':'5px', 'color':'#fff' });jQuery('#'+id+'_colorPreview') .css({'height':'50px'});return id; }; window.filmax_color_picker_show=function(id, fld, func){ if(id===null||id===''){ id=jQuery('.iColorPickerTable').attr('id'); } var eICP=fld.offset(); var w=jQuery('#'+id).width(); var h=jQuery('#'+id).height(); var l=eICP.left + w < jQuery(window).width()-10 ? eICP.left:jQuery(window).width()-10 - w; var t=eICP.top + fld.outerHeight() + h < jQuery(document).scrollTop() + jQuery(window).height()-10 ? eICP.top + fld.outerHeight():eICP.top - h - 13; jQuery("#"+id) .data({field: fld, func: func}) .css({ 'top':t+"px", 'left':l+"px", 'position':'absolute', 'z-index':999999 }) .fadeIn(500); jQuery("#"+id+"_Bg") .css({ 'position':'fixed', 'z-index':999998, 'top':0, 'left':0, 'width':'100%', 'height':'100%' }) .fadeIn(500); var def=fld.val().substr(0, 1)=='#' ? fld.val():filmax_rgb2hex(fld.css('backgroundColor')); jQuery('#'+id+'_colorPreview input,#'+id+'_colorOriginal input').val(def); jQuery('#'+id+'_colorPreview,#'+id+'_colorOriginal').css('background',def); }; window.filmax_get_cookie=function(name){ var defa=arguments[1]!==undefined ? arguments[1]:null; var start=document.cookie.indexOf(name + '='); var len=start + name.length + 1; if((!start)&&(name!=document.cookie.substring(0, name.length))){ return defa; } if(start==-1) return defa; var end=document.cookie.indexOf(';', len); if(end==-1) end=document.cookie.length; return unescape(document.cookie.substring(len, end)); }; window.filmax_set_cookie=function(name, value){ var expires=arguments[2]!==undefined ? arguments[2]:0; var path=arguments[3]!==undefined ? arguments[3]:'/'; var domain=arguments[4]!==undefined ? arguments[4]:''; var secure=arguments[5]!==undefined ? arguments[5]:''; var today=new Date(); today.setTime(today.getTime()); if(expires){ expires=expires * 1000 * 60 * 60 * 24; } var expires_date=new Date(today.getTime() + (expires)); document.cookie=name + '=' + escape(value) + ((expires) ? ';expires=' + expires_date.toGMTString():'') + ((path) ? ';path=' + path:'') + ((domain) ? ';domain=' + domain:'') + ((secure) ? ';secure':''); }; window.filmax_del_cookie=function(name, path, domain){ var path=arguments[1]!==undefined ? arguments[1]:'/'; var domain=arguments[2]!==undefined ? arguments[2]:''; if(filmax_get_cookie(name)) document.cookie=name + '=' + ((path) ? ';path=' + path:'') + ((domain) ? ';domain=' + domain:'') + ';expires=Thu, 01-Jan-1970 00:00:01 GMT'; }; window.filmax_clear_listbox=function(box){ for (var i=box.options.length-1; i >=0; i--) box.options[i]=null; }; window.filmax_add_listbox_item=function(box, val, text){ var item=new Option(); item.value=val; item.text=text; box.options.add(item); }; window.filmax_del_listbox_item_by_value=function(box, val){ for (var i=0; i < box.options.length; i++){ if(box.options[i].value==val){ box.options[i]=null; break; }} }; window.filmax_del_listbox_item_by_text=function(box, txt){ for (var i=0; i < box.options.length; i++){ if(box.options[i].text==txt){ box.options[i]=null; break; }} }; window.filmax_find_listbox_item_by_value=function(box, val){ var idx=-1; for (var i=0; i < box.options.length; i++){ if(box.options[i].value==val){ idx=i; break; }} return idx; }; window.filmax_find_listbox_item_by_text=function(box, txt){ var idx=-1; for (var i=0; i < box.options.length; i++){ if(box.options[i].text==txt){ idx=i; break; }} return idx; }; window.filmax_select_listbox_item_by_value=function(box, val){ for (var i=0; i < box.options.length; i++){ box.options[i].selected=(val==box.options[i].value); }}; window.filmax_select_listbox_item_by_text=function(box, txt){ for (var i=0; i < box.options.length; i++){ box.options[i].selected=(txt==box.options[i].text); }}; window.filmax_get_listbox_values=function(box){ var delim=arguments[1]!==undefined ? arguments[1]:','; var str=''; for (var i=0; i < box.options.length; i++){ str +=(str ? delim:'') + box.options[i].value; } return str; }; window.filmax_get_listbox_texts=function(box){ var delim=arguments[1]!==undefined ? arguments[1]:','; var str=''; for (var i=0; i < box.options.length; i++){ str +=(str ? delim:'') + box.options[i].text; } return str; }; window.filmax_sort_listbox=function(box){ var temp_opts=new Array(); var temp=new Option(); for(var i=0; i temp_opts[y].text){ temp=temp_opts[x]; temp_opts[x]=temp_opts[y]; temp_opts[y]=temp; }} } for(var i=0; i 0&&val.length < opt.rules[i].min_length.value){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

    ' + (typeof(opt.rules[i].min_length.message)!='undefined' ? opt.rules[i].min_length.message:opt.error_message_text) + '

    '; error=true; }} if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].max_length)=='object'){ if(opt.rules[i].max_length.value > 0&&val.length > opt.rules[i].max_length.value){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

    ' + (typeof(opt.rules[i].max_length.message)!='undefined' ? opt.rules[i].max_length.message:opt.error_message_text) + '

    '; error=true; }} if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].mask)=='object'){ if(opt.rules[i].mask.value!=''){ var regexp=new RegExp(opt.rules[i].mask.value); if(!regexp.test(val)){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

    ' + (typeof(opt.rules[i].mask.message)!='undefined' ? opt.rules[i].mask.message:opt.error_message_text) + '

    '; error=true; }} } if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].state)=='object'){ if(opt.rules[i].state.value=='checked'&&!jQuery(this).get(0).checked){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

    ' + (typeof(opt.rules[i].state.message)!='undefined' ? opt.rules[i].state.message:opt.error_message_text) + '

    '; error=true; }} if((!error||!opt.exit_after_first_error)&&typeof(opt.rules[i].equal_to)=='object'){ if(opt.rules[i].equal_to.value!=''&&val!=jQuery(jQuery(this).get(0).form[opt.rules[i].equal_to.value]).val()){ if(error_msg=='') jQuery(this).get(0).focus(); error_msg +='

    ' + (typeof(opt.rules[i].equal_to.message)!='undefined' ? opt.rules[i].equal_to.message:opt.error_message_text) + '

    '; error=true; }} if(opt.error_fields_class!='') jQuery(this).toggleClass(opt.error_fields_class, error); }} });if(error_msg!=''&&opt.error_message_show){ var error_message_box=form.find(".result"); if(error_message_box.length==0) error_message_box=form.parent().find(".result"); if(error_message_box.length==0){ form.append('
    '); error_message_box=form.find(".result"); } if(opt.error_message_class) error_message_box.toggleClass(opt.error_message_class, true); error_message_box.html(error_msg).fadeIn(); setTimeout(function(){ error_message_box.fadeOut(); }, opt.error_message_time); } return error_msg!=''; }; window.filmax_document_animate_to=function(id, callback){ var oft = !isNaN(id) ? Number(id):0; if(isNaN(id)){ if(id.indexOf('#')==-1) id='#' + id; var obj=jQuery(id).eq(0); if(obj.length==0) return; oft=obj.offset().top; } var st=jQuery(window).scrollTop(); var oft2=Math.max(0, oft - filmax_fixed_rows_height()); var speed=Math.min(1200, Math.max(300, Math.round(Math.abs(oft2-st) / jQuery(window).height() * 300))); if(st==0){ setTimeout(function(){ if(isNaN(id)) oft=obj.offset().top; oft2=Math.max(0, oft - filmax_fixed_rows_height()); jQuery('body,html').stop(true).animate({scrollTop: oft2}, Math.floor(speed/2), 'linear', callback); }, Math.floor(speed/2)); } jQuery('body,html').stop(true).animate({scrollTop: oft2}, speed, 'linear', callback); }; window.filmax_fixed_rows_height=function(){ var with_admin_bar=arguments.length>0 ? arguments[0]:true; var with_fixed_rows=arguments.length>1 ? arguments[1]:true; var oft=0; if(with_admin_bar){ var admin_bar=jQuery('#wpadminbar'); oft +=admin_bar.length > 0&&admin_bar.css('display')!='none'&&admin_bar.css('position')=='fixed' ? admin_bar.height():0; } if(with_fixed_rows){ jQuery('.sc_layouts_row_fixed_on').each(function(){ if(jQuery(this).css('position')=='fixed') oft +=jQuery(this).height(); });} return oft; }; window.filmax_document_set_location=function(curLoc){ try { history.pushState(null, null, curLoc); return; } catch(e){} location.href=curLoc; }; window.filmax_add_to_url=function(loc, prm){ var ignore_empty=arguments[2]!==undefined ? arguments[2]:true; var q=loc.indexOf('?'); var attr={}; if(q > 0){ var qq=loc.substr(q+1).split('&'); var parts=''; for (var i=0; i < qq.length; i++){ var parts=qq[i].split('='); attr[parts[0]]=parts.length>1 ? parts[1]:''; }} for (var p in prm){ attr[p]=prm[p]; } loc=(q > 0 ? loc.substr(0, q):loc) + '?'; var i=0; for (p in attr){ if(ignore_empty&&attr[p]=='') continue; loc +=(i++ > 0 ? '&':'') + p + '=' + attr[p]; } return loc; }; window.filmax_is_local_link=function(url){ var rez=url!==undefined; if(rez){ var url_pos=url.indexOf('#'); if(url_pos==0&&url.length==1) rez=false; else { if(url_pos < 0) url_pos=url.length; var loc=window.location.href; var loc_pos=loc.indexOf('#'); if(loc_pos > 0) loc=loc.substring(0, loc_pos); rez=url_pos==0; if(!rez) rez=loc==url.substring(0, url_pos); }} return rez; }; window.filmax_browser_is_mobile=function(){ var check=false; (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check=true})(navigator.userAgent||navigator.vendor||window.opera); return check; }; window.filmax_browser_is_ios=function(){ return navigator.userAgent.match(/iPad|iPhone|iPod/i)!=null; }; window.filmax_is_retina=function(){ var mediaQuery='(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)'; return (window.devicePixelRatio > 1)||(window.matchMedia&&window.matchMedia(mediaQuery).matches); }; window.filmax_get_file_name=function(path){ path=path.replace(/\\/g, '/'); var pos=path.lastIndexOf('/'); if(pos >=0) path=path.substr(pos+1); return path; }; window.filmax_get_file_ext=function(path){ var pos=path.lastIndexOf('.'); path=pos >=0 ? path.substr(pos+1):''; return path; }; window.filmax_check_images_complete=function(cont){ var complete=true; cont.find('img').each(function(){ if(!complete) return; if(!jQuery(this).get(0).complete) complete=false; });return complete; }; window.filmax_debug_object=function(obj){ var recursive=arguments[1] ? arguments[1]:0; var showMethods=arguments[2] ? arguments[2]:false; var level=arguments[3] ? arguments[3]:0; var dispStr=""; var addStr=""; var curStr=""; if(level > 0){ dispStr +=(obj===null ? "null":typeof(obj)) + "\n"; addStr=filmax_replicate(' ', level*2); } if(obj!==null&&(typeof(obj)=='object'||typeof(obj)=='array')){ for (var prop in obj){ if(!showMethods&&typeof(obj[prop])=='function') continue; if(levelx
    '); jQuery("#debug_log_close").on('click', function(e){ jQuery('#debug_log').hide(); e.preventDefault(); return false; });} if(clr) jQuery('#debug_log_content').empty(); jQuery('#debug_log_content').prepend(s+' '); jQuery('#debug_log').show(); }}; window.dcl===undefined&&(window.dcl=function(s){ console.log(s); });window.dco===undefined&&(window.dco=function(s,r){ console.log(filmax_debug_object(s,r)); });window.dal===undefined&&(window.dal=function(s){ if(FILMAX_STORAGE['user_logged_in']) alert(s); });window.dao===undefined&&(window.dao=function(s,r){ if(FILMAX_STORAGE['user_logged_in']) alert(filmax_debug_object(s,r)); });window.ddl===undefined&&(window.ddl=function(s,c){ filmax_debug_log(s,c); });window.ddo===undefined&&(window.ddo=function(s,r,c){ filmax_debug_log(filmax_debug_object(s,r),c); });})(); jQuery(document).ready(function(){ "use strict"; var theme_init_counter=0; filmax_init_actions(); function filmax_init_actions(){ if(FILMAX_STORAGE['vc_edit_mode']&&jQuery('.vc_empty-placeholder').length==0&&theme_init_counter++ < 30){ setTimeout(filmax_init_actions, 200); return; } jQuery(document).on('action.init_hidden_elements', filmax_stretch_height); jQuery(document).on('action.init_shortcodes', filmax_stretch_height); jQuery(document).on('action.sc_layouts_row_fixed_off', filmax_stretch_height); jQuery(document).on('action.sc_layouts_row_fixed_on', filmax_stretch_height); var vc_resize=false; jQuery(document).on('action.resize_vc_row_start', function(e, el){ vc_resize=true; filmax_resize_actions(el); });jQuery(window).resize(function(){ if(!vc_resize){ filmax_resize_actions(); }});jQuery(window).scroll(function(){ filmax_scroll_actions(); });filmax_ready_actions(); filmax_resize_actions(); filmax_scroll_actions(); if(jQuery('body').hasClass('menu_style_side')&&!filmax_check_images_complete(jQuery('.menu_side_wrap .sc_layouts_logo'))){ setTimeout(function(){ filmax_stretch_sidemenu(); }, 500); }} function filmax_ready_actions(){ document.documentElement.className=document.documentElement.className.replace(/\bno-js\b/,'js'); if(document.documentElement.className.indexOf(FILMAX_STORAGE['site_scheme'])==-1) document.documentElement.className +=' ' + FILMAX_STORAGE['site_scheme']; if(FILMAX_STORAGE['background_video']&&jQuery('.top_panel.with_bg_video').length > 0&&window.Bideo){ setTimeout(function(){ jQuery('.top_panel.with_bg_video').prepend(''); var bv=new Bideo(); bv.init({ videoEl: document.querySelector('#background_video'), container: document.querySelector('.top_panel'), resize: true, isMobile: window.matchMedia('(max-width: 768px)').matches, playButton: document.querySelector('#background_video_play'), pauseButton: document.querySelector('#background_video_pause'), src: [ { src: FILMAX_STORAGE['background_video'], type: 'video/'+filmax_get_file_ext(FILMAX_STORAGE['background_video']) } ], onLoad: function (){ }});}, 10); }else if(jQuery.fn.tubular){ jQuery('div#background_video').each(function(){ var youtube_code=jQuery(this).data('youtube-code'); if(youtube_code){ jQuery(this).tubular({videoId: youtube_code});jQuery('#tubular-player').appendTo(jQuery(this)).show(); jQuery('#tubular-container,#tubular-shield').remove(); }});} if(jQuery('.filmax_tabs:not(.inited)').length > 0&&jQuery.ui&&jQuery.ui.tabs){ jQuery('.filmax_tabs:not(.inited)').each(function (){ var init=jQuery(this).data('active'); if(isNaN(init)){ init=0; var active=jQuery(this).find('> ul > li[data-active="true"]').eq(0); if(active.length > 0){ init=active.index(); if(isNaN(init)||init < 0) init=0; }}else{ init=Math.max(0, init); } jQuery(this).addClass('inited').tabs({ active: init, show: { effect: 'fadeIn', duration: 300 }, hide: { effect: 'fadeOut', duration: 300 }, create: function(event, ui){ if(ui.panel.length > 0) jQuery(document).trigger('action.init_hidden_elements', [ui.panel]); }, activate: function(event, ui){ if(ui.newPanel.length > 0) jQuery(document).trigger('action.init_hidden_elements', [ui.newPanel]); }});});} jQuery('.filmax_tabs_ajax').on("tabsbeforeactivate", function(event, ui){ if(ui.newPanel.data('need-content')) filmax_tabs_ajax_content_loader(ui.newPanel, 1, ui.oldPanel); });jQuery('.filmax_tabs_ajax').on("click", '.nav-links a', function(e){ var panel=jQuery(this).parents('.filmax_tabs_content'); var page=1; var href=jQuery(this).attr('href'); var pos=-1; if((pos=href.lastIndexOf('/page/'))!=-1){ page=Number(href.substr(pos+6).replace("/", "")); if(!isNaN(page)) page=Math.max(1, page); } filmax_tabs_ajax_content_loader(panel, page); e.preventDefault(); return false; });if(jQuery('.menu_side_inner').length > 0&&jQuery('#toc_menu').length > 0) jQuery('#toc_menu').appendTo('.menu_side_inner'); jQuery('.menu_side_button').on('click', function(e){ jQuery(this).parent().toggleClass('opened'); e.preventDefault(); return false; });jQuery('.sc_layouts_menu li[class*="image-"]').each(function(){ var classes=jQuery(this).attr('class').split(' '); var icon=''; for (var i=0; i < classes.length; i++){ if(classes[i].indexOf('image-') >=0){ icon=classes[i].replace('image-', ''); break; }} if(icon) jQuery(this).find('>a').css('background-image', 'url('+FILMAX_STORAGE['theme_url']+'/trx_addons/css/icons.png/'+icon+'.png'); });jQuery('.menu_mobile .menu-item-has-children > a,.sc_layouts_menu_dir_vertical .menu-item-has-children > a').append(''); jQuery('.sc_layouts_menu_mobile_button > a,.menu_mobile_button,.menu_mobile_description').on('click', function(e){ if(jQuery(this).parent().hasClass('sc_layouts_menu_mobile_button_burger')&&jQuery(this).next().hasClass('sc_layouts_menu_popup')) return; jQuery('.menu_mobile_overlay').fadeIn(); jQuery('.menu_mobile').addClass('opened'); jQuery(document).trigger('action.stop_wheel_handlers'); e.preventDefault(); return false; });jQuery(document).on('keypress', function(e){ if(e.keyCode==27){ if(jQuery('.menu_mobile.opened').length==1){ jQuery('.menu_mobile_overlay').fadeOut(); jQuery('.menu_mobile').removeClass('opened'); jQuery(document).trigger('action.start_wheel_handlers'); e.preventDefault(); return false; }} });; jQuery('.menu_mobile_close, .menu_mobile_overlay').on('click', function(e){ jQuery('.menu_mobile_overlay').fadeOut(); jQuery('.menu_mobile').removeClass('opened'); jQuery(document).trigger('action.start_wheel_handlers'); e.preventDefault(); return false; });jQuery('.menu_mobile,.sc_layouts_menu_dir_vertical').on('click', 'li a, li a .open_child_menu', function(e){ var $a=jQuery(this).hasClass('open_child_menu') ? jQuery(this).parent():jQuery(this); if($a.parent().hasClass('menu-item-has-children')){ if($a.attr('href')=='#'||jQuery(this).hasClass('open_child_menu')){ if($a.siblings('ul:visible').length > 0) $a.siblings('ul').slideUp().parent().removeClass('opened'); else { jQuery(this).parents('li').siblings('li').find('ul:visible').slideUp().parent().removeClass('opened'); $a.siblings('ul').slideDown(function(){ if(!jQuery(this).hasClass('layouts_inited')&&jQuery(this).parents('.menu_mobile').length > 0){ jQuery(this).addClass('layouts_inited'); jQuery(document).trigger('action.init_hidden_elements', [jQuery(this)]); }}).parent().addClass('opened'); }} } if(!jQuery(this).hasClass('open_child_menu')&&jQuery(this).parents('.menu_mobile').length > 0&&filmax_is_local_link($a.attr('href'))) jQuery('.menu_mobile_close').trigger('click'); if(jQuery(this).hasClass('open_child_menu')||$a.attr('href')=='#'){ e.preventDefault(); return false; }});if(!FILMAX_STORAGE['trx_addons_exist']||jQuery('.top_panel.top_panel_default .sc_layouts_menu_default').length > 0){ filmax_init_sfmenu('.sc_layouts_menu:not(.inited) > ul:not(.inited)'); jQuery('.sc_layouts_menu:not(.inited)').each(function(){ if(jQuery(this).find('>ul.inited').length==1) jQuery(this).addClass('inited'); });jQuery(window).trigger('scroll'); } jQuery('select:not(.esg-sorting-select):not([class*="trx_addons_attrib_"])').each(function(){ var s=jQuery(this); if(s.css('display')!='none'&&!s.next().hasClass('select2')&&!s.hasClass('select2-hidden-accessible')) s.wrap('
    '); });jQuery("form#commentform").submit(function(e){ var rez=filmax_comments_validate(jQuery(this)); if(!rez) e.preventDefault(); return rez; });jQuery("form").on('keypress', '.error_field', function(){ if(jQuery(this).val()!='') jQuery(this).removeClass('error_field'); });jQuery(document).trigger('action.prepare_stretch_width'); jQuery('.trx-stretch-width').wrap('
    '); jQuery('.trx-stretch-width').after('
    '); filmax_stretch_width(); jQuery('.nav-links-more a').on('click', function(e){ if(FILMAX_STORAGE['load_more_link_busy']) return; FILMAX_STORAGE['load_more_link_busy']=true; var more=jQuery(this); var page=Number(more.data('page')); var max_page=Number(more.data('max-page')); if(page >=max_page){ more.parent().hide(); return; } more.parent().addClass('loading'); var panel=more.parents('.filmax_tabs_content'); if(panel.length==0){ jQuery.get(location.href, { paged: page+1 }).done(function(response){ var selector='filmax-inline-styles-inline-css'; var p1=response.indexOf(selector); if(p1 < 0){ selector='trx_addons-inline-styles-inline-css'; p1=response.indexOf(selector); } if(p1 > 0){ p1=response.indexOf('>', p1) + 1; var p2=response.indexOf('', p1); var inline_css_add=response.substring(p1, p2); var inline_css=jQuery('#'+selector); if(inline_css.length==0) jQuery('body').append(''); else inline_css.append(inline_css_add); } filmax_loadmore_add_items(jQuery('.content .posts_container').eq(0), jQuery(response).find('.content .posts_container > article,' +'.content .posts_container > div[class*="column-"],' +'.content .posts_container > .masonry_item')); });}else{ jQuery.post(FILMAX_STORAGE['ajax_url'], { nonce: FILMAX_STORAGE['ajax_nonce'], action: 'filmax_ajax_get_posts', blog_template: panel.data('blog-template'), blog_style: panel.data('blog-style'), posts_per_page: panel.data('posts-per-page'), cat: panel.data('cat'), parent_cat: panel.data('parent-cat'), post_type: panel.data('post-type'), taxonomy: panel.data('taxonomy'), page: page+1 }).done(function(response){ var rez={}; try { rez=JSON.parse(response); } catch (e){ rez={ error: FILMAX_STORAGE['strings']['ajax_error'] }; console.log(response); } if(rez.error!==''){ panel.html('
    '+rez.error+'
    '); }else{ filmax_loadmore_add_items(panel.find('.posts_container'), jQuery(rez.data).find('article')); }});} function filmax_loadmore_add_items(container, items){ if(container.length > 0&&items.length > 0){ container.append(items); if(container.hasClass('portfolio_wrap')||container.hasClass('masonry_wrap')){ container.masonry('appended', items).masonry(); if(container.hasClass('gallery_wrap')){ FILMAX_STORAGE['GalleryFx'][container.attr('id')].appendItems(); }} more.data('page', page+1).parent().removeClass('loading'); jQuery('#toc_menu').remove(); FILMAX_STORAGE['init_all_mediaelements']=true; jQuery(document).trigger('action.init_shortcodes', [container.parent()]); jQuery(document).trigger('action.init_hidden_elements', [container.parent()]); if(jQuery('.menu_side_inner').length > 0&&jQuery('#toc_menu').length > 0){ jQuery('#toc_menu').appendTo('.menu_side_inner'); filmax_stretch_sidemenu(); }} if(page+1 >=max_page) more.parent().hide(); else FILMAX_STORAGE['load_more_link_busy']=false; jQuery(window).trigger('scroll'); } e.preventDefault(); return false; });if(jQuery('input[type="checkbox"][name="i_agree_privacy_policy"]:not(.inited),input[type="checkbox"][name="gdpr_terms"]:not(.inited),input[type="checkbox"][name="wpgdprc"]:not(.inited),#wpmtst-form input[type="checkbox"]:not(.inited),input[type="checkbox"][name="AGREE_TO_TERMS"]:not(.inited)').length > 0){ jQuery('input[type="checkbox"][name="i_agree_privacy_policy"]:not(.inited),input[type="checkbox"][name="gdpr_terms"]:not(.inited),input[type="checkbox"][name="wpgdprc"]:not(.inited),#wpmtst-form input[type="checkbox"]:not(.inited),input[type="checkbox"][name="AGREE_TO_TERMS"]:not(.inited)') .addClass('inited') .on('change', function(e){ if(jQuery(this).get(0).checked) jQuery(this).parents('form').find('button,input[type="submit"]').removeAttr('disabled'); else jQuery(this).parents('form').find('button,input[type="submit"]').attr('disabled', 'disabled'); }).trigger('change'); } jQuery('.wpcf7-checkbox > .wpcf7-list-item > .wpcf7-list-item-label,.wpcf7-radio > .wpcf7-list-item > .wpcf7-list-item-label,.wpcf7-wpgdprc > .wpcf7-list-item > .wpcf7-list-item-label').on('click', function(){ var chk=jQuery(this).siblings('input[type="checkbox"],input[type="radio"]'); if(chk.attr('type')=='radio'){ jQuery(this).parents('.wpcf7-radio') .find('.wpcf7-list-item-label').removeClass('wpcf7-list-item-checked') .find('input[type="radio"]').each(function(){ this.checked=false; }); } if(chk.length > 0){ chk.get(0).checked=chk.get(0).checked ? false:true; jQuery(this).toggleClass('wpcf7-list-item-checked', chk.get(0).checked); chk.trigger('change'); }}); jQuery(document).on('action.scroll_filmax', function(e){ if(FILMAX_STORAGE['load_more_link_busy']) return; var container=jQuery('.content > .posts_container').eq(0); var inf=jQuery('.nav-links-infinite'); if(inf.length==0) return; if(container.offset().top + container.height() < jQuery(window).scrollTop() + jQuery(window).height()*1.5) inf.find('a').trigger('click'); });jQuery(document).trigger('action.ready_filmax'); jQuery(document).on('action.init_hidden_elements', filmax_init_post_formats); jQuery(document).trigger('action.init_hidden_elements', [jQuery('body').eq(0)]); } function filmax_scroll_actions(){ jQuery(document).trigger('action.scroll_filmax'); filmax_shift_under_panels(); } function filmax_shift_under_panels(){ if(jQuery('body').hasClass('header_position_under')&&!filmax_browser_is_mobile()){ var delta=50; var scroll_offset=jQuery(window).scrollTop(); var adminbar=jQuery('#wpadminbar'); var adminbar_height=adminbar.length==0&&adminbar.css('position')=='fixed' ? 0:adminbar.height(); var header=jQuery('.top_panel'); var header_height=header.height(); var mask=header.find('.top_panel_mask'); if(mask.length==0){ header.append('
    '); mask=header.find('.top_panel_mask'); } if(scroll_offset > adminbar_height){ var offset=scroll_offset - adminbar_height; if(offset <=header_height){ var mask_opacity=Math.max(0, Math.min(0.8, (offset-delta)/header_height)); if(!(/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor))||header.find('.slider_engine_revo').length==0) header.css('top', Math.round(offset/1.2)+'px'); mask.css({ 'opacity': mask_opacity, 'display': offset==0 ? 'none':'block' });}else if(parseInt(header.css('top'))!=0){ header.css('top', Math.round(offset/1.2)+'px'); }}else if(parseInt(header.css('top'))!=0||mask.css('display')!='none'){ header.css('top', '0px'); mask.css({ 'opacity': 0, 'display': 'none' });} var footer=jQuery('.footer_wrap'); var footer_height=Math.min(footer.height(), jQuery(window).height()); var footer_visible=(scroll_offset + jQuery(window).height()) - (header.outerHeight() + jQuery('.page_content_wrap').outerHeight()); if(footer_visible > 0){ mask=footer.find('.top_panel_mask'); if(mask.length==0){ footer.append('
    '); mask=footer.find('.top_panel_mask'); } if(footer_visible <=footer_height){ var mask_opacity=Math.max(0, Math.min(0.8, (footer_height - footer_visible)/footer_height)); if(!(/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor))||footer.find('.slider_engine_revo').length==0) footer.css('top', -Math.round((footer_height - footer_visible)/1.2)+'px'); mask.css({ 'opacity': mask_opacity, 'display': footer_height - footer_visible <=0 ? 'none':'block' });}else if(parseInt(footer.css('top'))!=0||mask.css('display')!='none'){ footer.css('top', 0); mask.css({ 'opacity': 0, 'display': 'none' });}} }} function filmax_resize_actions(cont){ filmax_check_layout(); filmax_fix_footer(); filmax_stretch_width(cont); filmax_stretch_height(null, cont); filmax_stretch_bg_video(); filmax_vc_row_fullwidth_to_boxed(cont); filmax_stretch_sidemenu(); filmax_resize_video(cont); jQuery(document).trigger('action.resize_filmax', [cont]); } function filmax_stretch_sidemenu(){ var toc_items=jQuery('.menu_side_wrap .toc_menu_item'); if(toc_items.length==0) return; var toc_items_height=jQuery(window).height() - filmax_fixed_rows_height(true, false) - jQuery('.menu_side_wrap .sc_layouts_logo').outerHeight() - toc_items.length; var th=Math.floor(toc_items_height / toc_items.length); var th_add=toc_items_height - th*toc_items.length; if(FILMAX_STORAGE['menu_side_stretch']&&toc_items.length >=5&&th >=30){ toc_items.find(".toc_menu_description,.toc_menu_icon").css({ 'height': th+'px', 'lineHeight': th+'px' });toc_items.eq(0).find(".toc_menu_description,.toc_menu_icon").css({ 'height': (th+th_add)+'px', 'lineHeight': (th+th_add)+'px' });}} jQuery(document).on('action.toc_menu_item_active', function(){ var toc_menu=jQuery('.menu_side_wrap #toc_menu'); if(toc_menu.length==0) return; var toc_items=toc_menu.find('.toc_menu_item'); if(toc_items.length==0) return; var th=toc_items.eq(0).height(), toc_menu_pos=parseFloat(toc_menu.css('top')), toc_items_height=toc_items.length * th, menu_side_height=jQuery(window).height() - filmax_fixed_rows_height(true, false) - jQuery('.menu_side_wrap .sc_layouts_logo').outerHeight() - jQuery('.menu_side_wrap .sc_layouts_logo + .toc_menu_item').outerHeight(); if(toc_items_height > menu_side_height){ var toc_item_active=jQuery('.menu_side_wrap .toc_menu_item_active').eq(0); if(toc_item_active.length==1){ var toc_item_active_pos=(toc_item_active.index() + 1) * th; if(toc_menu_pos + toc_item_active_pos > menu_side_height - th) toc_menu.css('top', Math.max(-toc_item_active_pos + 3*th, menu_side_height - toc_items_height)); else if(toc_menu_pos < 0&&toc_item_active_pos < -toc_menu_pos + 2*th) toc_menu.css('top', Math.min(-toc_item_active_pos + 3*th, 0)); }}else if(toc_menu_pos < 0){ toc_menu.css('top', 0); }});function filmax_check_layout(){ var resize=true; if(jQuery('body').hasClass('no_layout')){ jQuery('body').removeClass('no_layout'); resize=false; } var w=window.innerWidth; if(w==undefined) w=jQuery(window).width()+(jQuery(window).height() < jQuery(document).height()||jQuery(window).scrollTop() > 0 ? 16:0); if(FILMAX_STORAGE['mobile_layout_width'] >=w){ if(!jQuery('body').hasClass('mobile_layout')){ jQuery('body').removeClass('desktop_layout').addClass('mobile_layout'); if(resize) jQuery(window).trigger('resize'); }}else{ if(!jQuery('body').hasClass('desktop_layout')){ jQuery('body').removeClass('mobile_layout').addClass('desktop_layout'); jQuery('.menu_mobile').removeClass('opened'); jQuery('.menu_mobile_overlay').hide(); if(resize) jQuery(window).trigger('resize'); }} if(FILMAX_STORAGE['mobile_device']||filmax_browser_is_mobile()) jQuery('body').addClass('mobile_device'); } function filmax_stretch_width(cont){ if(cont===undefined) cont=jQuery('body'); cont.find('.trx-stretch-width').each(function(){ var $el=jQuery(this); var $el_cont=$el.parents('.page_wrap'); var $el_cont_offset=0; if($el_cont.length==0) $el_cont=jQuery(window); else $el_cont_offset=$el_cont.offset().left; var $el_full=$el.next('.trx-stretch-width-original'); var el_margin_left=parseInt($el.css('margin-left'), 10); var el_margin_right=parseInt($el.css('margin-right'), 10); var offset=$el_cont_offset - $el_full.offset().left - el_margin_left; var width=$el_cont.width(); if(!$el.hasClass('inited')){ $el.addClass('inited invisible'); $el.css({ 'position': 'relative', 'box-sizing': 'border-box' });} $el.css({ 'left': offset, 'width': $el_cont.width() });if(!$el.hasClass('trx-stretch-content')){ var padding=Math.max(0, -1*offset); var paddingRight=Math.max(0, width - padding - $el_full.width() + el_margin_left + el_margin_right); $el.css({ 'padding-left': padding + 'px', 'padding-right': paddingRight + 'px' }); } $el.removeClass('invisible'); });} function filmax_stretch_height(e, cont){ if(cont===undefined) cont=jQuery('body'); cont.find('.filmax-full-height').each(function (){ var fullheight_item=jQuery(this); if(jQuery(this).parents('div:hidden,section:hidden,article:hidden').length > 0){ return; } var fullheight_row=jQuery(this).parents('.vc_row-o-full-height'); if(fullheight_row.length > 0) fullheight_item.height(fullheight_row.height()); else { var fh=filmax_fixed_rows_height(); var wh=jQuery(window).width() >=960 ? jQuery(window).height() - fh:'auto'; if(wh > 0){ if(fullheight_item.data('display')!=fullheight_item.css('display')) fullheight_item.css('display', fullheight_item.data('display')); fullheight_item.css('height', wh); }else if(wh=='auto'&&fullheight_item.css('height')!='auto'){ if(fullheight_item.data('display')==undefined) fullheight_item.attr('data-display', fullheight_item.css('display')); fullheight_item.css({'height': wh, 'display': 'block'});}} });} function filmax_resize_video(cont){ if(cont===undefined) cont=jQuery('body'); cont.find('video').each(function(){ if(jQuery(this).hasClass('trx_addons_resize')||jQuery(this).addClass('filmax_resize').parents('div:hidden,section:hidden,article:hidden').length > 0){ return; } var video=jQuery(this).eq(0); var ratio=(video.data('ratio')!=undefined ? video.data('ratio').split(':'):[16,9]); ratio=ratio.length!=2||ratio[0]==0||ratio[1]==0 ? 16/9:ratio[0]/ratio[1]; var mejs_cont=video.parents('.mejs-video'); var w_attr=video.data('width'); var h_attr=video.data('height'); if(!w_attr||!h_attr){ w_attr=video.attr('width'); h_attr=video.attr('height'); if(!w_attr||!h_attr) return; video.data({'width': w_attr, 'height': h_attr});} var percent=(''+w_attr).substr(-1)=='%'; w_attr=parseInt(w_attr, 10); h_attr=parseInt(h_attr, 10); var w_real=Math.round(mejs_cont.length > 0 ? Math.min(percent ? 10000:w_attr, mejs_cont.parents('div,article').width()):Math.min(percent ? 10000:w_attr, video.parents('div,article').width())), h_real=Math.round(percent ? w_real/ratio:w_real/w_attr*h_attr); if(parseInt(video.attr('data-last-width'), 10)==w_real) return; if(percent){ video.height(h_real); }else if(video.parents('.wp-video-playlist').length > 0){ if(mejs_cont.length===0){ video.attr({'width': w_real, 'height': h_real});}}else{ video.attr({'width': w_real, 'height': h_real}).css({'width': w_real+'px', 'height': h_real+'px'});if(mejs_cont.length > 0){ filmax_set_mejs_player_dimensions(video, w_real, h_real); }} video.attr('data-last-width', w_real); });cont.find('.video_frame iframe').each(function(){ if(jQuery(this).hasClass('trx_addons_resize')||jQuery(this).addClass('filmax_resize').parents('div:hidden,section:hidden,article:hidden').length > 0){ return; } var iframe=jQuery(this).eq(0); if(iframe.attr('src').indexOf('soundcloud')>0) return; var ratio=(iframe.data('ratio')!=undefined ? iframe.data('ratio').split(':'):(iframe.parent().data('ratio')!=undefined ? iframe.parent().data('ratio').split(':'):(iframe.find('[data-ratio]').length>0 ? iframe.find('[data-ratio]').data('ratio').split(':'):[16,9]))); ratio=ratio.length!=2||ratio[0]==0||ratio[1]==0 ? 16/9:ratio[0]/ratio[1]; var w_attr=iframe.attr('width'); var h_attr=iframe.attr('height'); if(!w_attr||!h_attr){ return; } var percent=(''+w_attr).substr(-1)=='%'; w_attr=parseInt(w_attr, 10); h_attr=parseInt(h_attr, 10); var pw=iframe.parent().width(), ph=iframe.parent().height(), w_real=pw, h_real=Math.round(percent ? w_real/ratio:w_real/w_attr*h_attr); if(iframe.parent().css('position')=='absolute'&&h_real > ph){ h_real=ph; w_real=Math.round(percent ? h_real*ratio:h_real*w_attr/h_attr) } if(parseInt(iframe.attr('data-last-width'), 10)==w_real) return; iframe.css({'width': w_real+'px', 'height': h_real+'px'});iframe.attr('data-last-width', w_real); });} function filmax_set_mejs_player_dimensions(video, w, h){ if(mejs){ for (var pl in mejs.players){ if(mejs.players[pl].media.src==video.attr('src')){ if(mejs.players[pl].media.setVideoSize){ mejs.players[pl].media.setVideoSize(w, h); }else if(mejs.players[pl].media.setSize){ mejs.players[pl].media.setSize(w, h); } mejs.players[pl].setPlayerSize(w, h); mejs.players[pl].setControlsSize(); }} }} function filmax_stretch_bg_video(){ var video_wrap=jQuery('div#background_video,.tourmaster-background-video'); if(video_wrap.length==0) return; var cont=video_wrap.hasClass('tourmaster-background-video') ? video_wrap.parent():video_wrap, w=cont.width(), h=cont.height(), video=video_wrap.find('>iframe,>video'); if(w/h < 16/9) w=h/9*16; else h=w/16*9; video .attr({'width': w, 'height': h}) .css({'width': w, 'height': h});} function filmax_vc_row_fullwidth_to_boxed(cont){ if(jQuery('body').hasClass('body_style_boxed')||jQuery('body').hasClass('menu_style_side')){ if(cont===undefined||!cont.hasClass('.vc_row')||!cont.data('vc-full-width')) cont=jQuery('.vc_row[data-vc-full-width="true"]'); var width_content=jQuery('.page_wrap').width(); var width_content_wrap=jQuery('.page_content_wrap .content_wrap').width(); var indent=(width_content - width_content_wrap) / 2; var rtl=jQuery('html').attr('dir')=='rtl'; cont.each(function(){ var mrg=parseInt(jQuery(this).css('marginLeft')); var stretch_content=jQuery(this).attr('data-vc-stretch-content'); var in_content=jQuery(this).parents('.content_wrap').length > 0; jQuery(this).css({ 'width': width_content, 'left': rtl ? 'auto':(in_content ? -indent:0) - mrg, 'right': !rtl ? 'auto':(in_content ? -indent:0) - mrg, 'padding-left': stretch_content ? 0:indent + mrg, 'padding-right': stretch_content ? 0:indent + mrg });});}} function filmax_fix_footer(){ if(jQuery('body').hasClass('header_position_under')&&!filmax_browser_is_mobile()){ var ft=jQuery('.footer_wrap'); if(ft.length > 0){ var ft_height=ft.outerHeight(false), pc=jQuery('.page_content_wrap'), pc_offset=pc.offset().top, pc_height=pc.height(); if(pc_offset + pc_height + ft_height < jQuery(window).height()){ if(ft.css('position')!='absolute'){ ft.css({ 'position': 'absolute', 'left': 0, 'bottom': 0, 'width' :'100%' });}}else{ if(ft.css('position')!='relative'){ ft.css({ 'position': 'relative', 'left': 'auto', 'bottom': 'auto' });}} }} } function filmax_fix_sidebar(){ var sb=jQuery('.sidebar'); var content=sb.siblings('.content'); if(sb.length > 0){ if(content.css('float')=='none'){ var old_style=sb.data('old_style'); if(old_style!==undefined) sb.attr('style', old_style).removeAttr('data-old_style'); }else{ var sb_height=sb.outerHeight(); var content_height=content.outerHeight(); var content_top=content.offset().top; var scroll_offset=jQuery(window).scrollTop(); var top_panel_fixed_height=filmax_fixed_rows_height(); if(sb_height < content_height&&scroll_offset + top_panel_fixed_height > content_top){ var sb_init={ 'position': 'undefined', 'float': 'none', 'top': 'auto', 'bottom':'auto' }; if(typeof FILMAX_STORAGE['scroll_offset_last']=='undefined'){ FILMAX_STORAGE['sb_top_last']=content_top; FILMAX_STORAGE['scroll_offset_last']=scroll_offset; FILMAX_STORAGE['scroll_dir_last']=1; } var scroll_dir=scroll_offset - FILMAX_STORAGE['scroll_offset_last']; if(scroll_dir==0) scroll_dir=FILMAX_STORAGE['scroll_dir_last']; else scroll_dir=scroll_dir > 0 ? 1:-1; var sb_big=sb_height + 30 >=jQuery(window).height() - top_panel_fixed_height, sb_top=sb.offset().top; if(sb_top < 0) sb_top=FILMAX_STORAGE['sb_top_last']; if(sb_big){ if(scroll_dir!=FILMAX_STORAGE['scroll_dir_last']&&sb.css('position')=='fixed'){ sb_init.top=sb_top - content_top; sb_init.position='absolute'; }else if(scroll_dir > 0){ if(scroll_offset + jQuery(window).height() >=content_top + content_height + 30){ sb_init.bottom=0; sb_init.position='absolute'; }else if(scroll_offset + jQuery(window).height() >=(sb.css('position')=='absolute' ? sb_top:content_top) + sb_height + 30){ sb_init.bottom=30; sb_init.position='fixed'; }}else{ if(scroll_offset + top_panel_fixed_height <=sb_top){ sb_init.top=top_panel_fixed_height; sb_init.position='fixed'; }} }else{ if(scroll_offset + top_panel_fixed_height >=content_top + content_height - sb_height){ sb_init.bottom=0; sb_init.position='absolute'; }else{ sb_init.top=top_panel_fixed_height; sb_init.position='fixed'; }} if(sb_init.position!='undefined'){ var pos=0; if(sb_init.position=='fixed'||(!jQuery('body').hasClass('body_style_wide')&&!jQuery('body').hasClass('body_style_boxed'))){ var sb_parent=sb.parent(); pos=sb_parent.position(); pos=pos.left + Math.max(0, parseInt(sb_parent.css('paddingLeft'), 10)) + Math.max(0, parseInt(sb_parent.css('marginLeft'), 10)) + (sb_init.position=='fixed'&&jQuery('body').hasClass('menu_style_right')&&sb.hasClass('right') ? Math.max(0, parseInt(jQuery('body').css('marginRight'), 10)):(sb_init.position=='fixed'&&jQuery('body').hasClass('menu_style_left')&&sb.hasClass('left') ? Math.max(0, parseInt(jQuery('body').css('marginLeft'), 10)):0)); } if(sb.hasClass('right')) sb_init.right=sb_init.position=='fixed'||jQuery('body').hasClass('body_style_fullwide') ? pos:0; else sb_init.left=sb_init.position=='fixed'||jQuery('body').hasClass('body_style_fullwide') ? pos:0; if(sb.css('position')!=sb_init.position||FILMAX_STORAGE['scroll_dir_last']!=scroll_dir){ if(sb.data('old_style')===undefined){ var style=sb.attr('style'); if(!style) style=''; sb.attr('data-old_style', style); } sb.css(sb_init); }} FILMAX_STORAGE['sb_top_last']=sb_top; FILMAX_STORAGE['scroll_offset_last']=scroll_offset; FILMAX_STORAGE['scroll_dir_last']=scroll_dir; }else{ var old_style=sb.data('old_style'); if(old_style!==undefined) sb.attr('style', old_style).removeAttr('data-old_style'); }} }} function filmax_init_sfmenu(selector){ jQuery(selector).show().each(function(){ if(jQuery(this).addClass('inited').parents('.menu_mobile').length > 0) return; var animation_in=jQuery(this).parent().data('animation_in'); if(animation_in==undefined) animation_in="none"; var animation_out=jQuery(this).parent().data('animation_out'); if(animation_out==undefined) animation_out="none"; jQuery(this).superfish({ delay: 500, animation: { opacity: 'show' }, animationOut: { opacity: 'hide' }, speed: animation_in!='none' ? 500:200, speedOut: animation_out!='none' ? 500:200, autoArrows: false, dropShadows: false, onBeforeShow: function(ul){ if(jQuery(this).parents("ul").length > 1){ var w=jQuery('.page_wrap').width(); var par_offset=jQuery(this).parents("ul").offset().left; var par_width=jQuery(this).parents("ul").outerWidth(); var ul_width=jQuery(this).outerWidth(); if(par_offset+par_width+ul_width > w-20&&par_offset-ul_width > 0) jQuery(this).addClass('submenu_left'); else jQuery(this).removeClass('submenu_left'); } if(animation_in!='none'){ jQuery(this).removeClass('animated fast '+animation_out); jQuery(this).addClass('animated fast '+animation_in); }}, onBeforeHide: function(ul){ if(animation_out!='none'){ jQuery(this).removeClass('animated fast '+animation_in); jQuery(this).addClass('animated fast '+animation_out); }}, onShow: function(ul){ if(!jQuery(this).hasClass('layouts_inited')){ jQuery(this).addClass('layouts_inited'); jQuery(document).trigger('action.init_hidden_elements', [jQuery(this)]); }} });});} function filmax_init_post_formats(e, cont){ filmax_init_media_elements(cont); cont.find('.format-video .post_featured.with_thumb .post_video_hover:not(.inited)') .addClass('inited') .on('click', function(e){ jQuery(this).parents('.post_featured') .addClass('post_video_play') .find('.post_video').html(jQuery(this).data('video')); jQuery(window).trigger('resize'); e.preventDefault(); return false; });} function filmax_init_media_elements(cont){ if(FILMAX_STORAGE['use_mediaelements']&&cont.find('audio:not(.inited),video:not(.inited)').length > 0){ if(window.mejs){ if(window.mejs.MepDefaults) window.mejs.MepDefaults.enableAutosize=true; if(window.mejs.MediaElementDefaults) window.mejs.MediaElementDefaults.enableAutosize=true; cont.find('audio:not(.inited),video:not(.inited)').each(function(){ if(jQuery(this).parents('div:hidden,section:hidden,article:hidden').length > 0){ return; } if(jQuery(this).addClass('inited').parents('.mejs-mediaelement').length==0&&jQuery(this).parents('.wp-block-video').length==0&&! jQuery(this).hasClass('wp-block-cover__video-background')&&(FILMAX_STORAGE['init_all_mediaelements']||(!jQuery(this).hasClass('wp-audio-shortcode')&&!jQuery(this).hasClass('wp-video-shortcode')&&!jQuery(this).parent().hasClass('wp-playlist')&&jQuery(this).parents('.elementor-background-video-container').length==0))){ var media_tag=jQuery(this); var settings={ enableAutosize: true, videoWidth: -1, videoHeight: -1, audioWidth: '100%', audioHeight: 30, success: function(mejs){ if(mejs.pluginType&&'flash'===mejs.pluginType&&mejs.attributes){ mejs.attributes.autoplay&&'false'!==mejs.attributes.autoplay&&mejs.addEventListener('canplay', function (){ mejs.play(); }, false); mejs.attributes.loop&&'false'!==mejs.attributes.loop&&mejs.addEventListener('ended', function (){ mejs.play(); }, false); }} }; jQuery(this).mediaelementplayer(settings); }});} else setTimeout(function(){ filmax_init_media_elements(cont); }, 400); } setTimeout(function(){ FILMAX_STORAGE['init_all_mediaelements']=true; }, 1000); } function filmax_tabs_ajax_content_loader(panel, page, oldPanel){ if(panel.html().replace(/\s/g, '')==''){ var height=oldPanel===undefined ? panel.height():oldPanel.height(); if(isNaN(height)||height < 100) height=100; panel.html('
    '); } else panel.find('> *').addClass('filmax_tab_content_remove'); panel.data('need-content', false).addClass('filmax_loading'); jQuery.post(FILMAX_STORAGE['ajax_url'], { nonce: FILMAX_STORAGE['ajax_nonce'], action: 'filmax_ajax_get_posts', blog_template: panel.data('blog-template'), blog_style: panel.data('blog-style'), posts_per_page: panel.data('posts-per-page'), cat: panel.data('cat'), parent_cat: panel.data('parent-cat'), post_type: panel.data('post-type'), taxonomy: panel.data('taxonomy'), page: page }).done(function(response){ panel.removeClass('filmax_loading'); var rez={}; try { rez=JSON.parse(response); } catch (e){ rez={ error: FILMAX_STORAGE['strings']['ajax_error'] }; console.log(response); } if(rez.error!==''){ panel.html('
    '+rez.error+'
    '); }else{ panel.prepend(rez.data).fadeIn(function(){ jQuery(document).trigger('action.init_shortcodes', [panel]); jQuery(document).trigger('action.init_hidden_elements', [panel]); jQuery(window).trigger('scroll'); setTimeout(function(){ panel.find('.filmax_tab_holder,.filmax_tab_content_remove').remove(); jQuery(window).trigger('scroll'); }, 600); });}});} function filmax_comments_validate(form){ form.find('input').removeClass('error_field'); var comments_args={ error_message_text: FILMAX_STORAGE['strings']['error_global'], error_message_show: true, error_message_time: 4000, error_message_class: 'filmax_messagebox filmax_messagebox_style_error', error_fields_class: 'error_field', exit_after_first_error: false, rules: [ { field: 'comment', min_length: { value: 1, message: FILMAX_STORAGE['strings']['text_empty'] }, max_length: { value: FILMAX_STORAGE['comment_maxlength'], message: FILMAX_STORAGE['strings']['text_long']}} ] }; if(form.find('.comments_author input[aria-required="true"]').length > 0){ comments_args.rules.push({ field: 'author', min_length: { value: 1, message: FILMAX_STORAGE['strings']['name_empty']}, max_length: { value: 60, message: FILMAX_STORAGE['strings']['name_long']}}); } if(form.find('.comments_email input[aria-required="true"]').length > 0){ comments_args.rules.push({ field: 'email', min_length: { value: 1, message: FILMAX_STORAGE['strings']['email_empty']}, max_length: { value: 60, message: FILMAX_STORAGE['strings']['email_long']}, mask: { value: FILMAX_STORAGE['email_mask'], message: FILMAX_STORAGE['strings']['email_not_valid']}}); } var error=filmax_form_validate(form, comments_args); return !error; }});jQuery(document).on('action.init_hidden_elements', function(e, cont){ "use strict"; if(FILMAX_STORAGE['button_hover']&&FILMAX_STORAGE['button_hover']!='default'){ jQuery('button:not(.search_submit):not([class*="sc_button_hover_"]),\ .theme_button:not([class*="sc_button_hover_"]),\ .sc_button:not([class*="sc_button_simple"]):not([class*="sc_button_hover_"]),\ .sc_form_field button:not([class*="sc_button_hover_"]),\ .post_item .more-link:not([class*="sc_button_hover_"]),\ .trx_addons_hover_content .trx_addons_hover_links a:not([class*="sc_button_hover_"]),\ .filmax_tabs .filmax_tabs_titles li a:not([class*="sc_button_hover_"]),\ .hover_shop_buttons .icons a:not([class*="sc_button_hover_style_"]),\ .mptt-navigation-tabs li a:not([class*="sc_button_hover_style_"]),\ .edd_download_purchase_form .button:not([class*="sc_button_hover_style_"]),\ .edd-submit.button:not([class*="sc_button_hover_style_"]),\ .widget_edd_cart_widget .edd_checkout a:not([class*="sc_button_hover_style_"]),\ .woocommerce #respond input#submit:not([class*="sc_button_hover_"]),\ .woocommerce .button:not([class*="shop_"]):not([class*="view"]):not([class*="sc_button_hover_"]),\ .woocommerce-page .button:not([class*="shop_"]):not([class*="view"]):not([class*="sc_button_hover_"]),\ #buddypress a.button:not([class*="sc_button_hover_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_'+FILMAX_STORAGE['button_hover']); if(FILMAX_STORAGE['button_hover']!='arrow'){ jQuery('input[type="submit"]:not([class*="sc_button_hover_"]),\ input[type="button"]:not([class*="sc_button_hover_"]),\ .vc_tta-accordion .vc_tta-panel-heading .vc_tta-controls-icon:not([class*="sc_button_hover_"]),\ .vc_tta-color-grey.vc_tta-style-classic .vc_tta-tab > a:not([class*="sc_button_hover_"]),\ .single-product div.product .woocommerce-tabs .wc-tabs li a,\ .woocommerce nav.woocommerce-pagination ul li a:not([class*="sc_button_hover_"]),\ .tribe-events-button:not([class*="sc_button_hover_"]),\ #tribe-bar-views .tribe-bar-views-list .tribe-bar-views-option a:not([class*="sc_button_hover_"]),\ .tribe-bar-mini #tribe-bar-views .tribe-bar-views-list .tribe-bar-views-option a:not([class*="sc_button_hover_"]),\ .tribe-events-cal-links a:not([class*="sc_button_hover_"]),\ .tribe-events-sub-nav li a:not([class*="sc_button_hover_"]),\ .isotope_filters_button:not([class*="sc_button_hover_"]),\ .trx_addons_scroll_to_top:not([class*="sc_button_hover_"]),\ .sc_promo_modern .sc_promo_link2:not([class*="sc_button_hover_"]),\ .post_item_single .post_content .post_meta .post_share .social_item .social_icon:not([class*="sc_button_hover_"]),\ .slider_container .slider_prev:not([class*="sc_button_hover_"]),\ .slider_container .slider_next:not([class*="sc_button_hover_"]),\ .sc_slider_controller_titles .slider_controls_wrap > a:not([class*="sc_button_hover_"]),\ .tagcloud > a:not([class*="sc_button_hover_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_'+FILMAX_STORAGE['button_hover']); } jQuery('.sc_slider_controller_titles .slider_controls_wrap > a:not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_default'); jQuery('.trx_addons_hover_content .trx_addons_hover_links a:not([class*="sc_button_hover_style_"]),\ .single-product ul.products li.product .post_data .button:not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_inverse'); jQuery('.post_item_single .post_content .post_meta .post_share .social_item .social_icon:not([class*="sc_button_hover_style_"]),\ .woocommerce #respond input#submit.alt:not([class*="sc_button_hover_style_"]),\ .woocommerce a.button.alt:not([class*="sc_button_hover_style_"]),\ .woocommerce button.button.alt:not([class*="sc_button_hover_style_"]),\ .woocommerce input.button.alt:not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_hover'); jQuery('.woocommerce .woocommerce-message .button:not([class*="sc_button_hover_style_"]),\ .woocommerce .woocommerce-info .button:not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_alter'); jQuery('.sidebar .trx_addons_tabs .trx_addons_tabs_titles li a:not([class*="sc_button_hover_style_"]),\ .filmax_tabs .filmax_tabs_titles li a:not([class*="sc_button_hover_style_"]),\ .widget_tag_cloud a:not([class*="sc_button_hover_style_"]),\ .widget_product_tag_cloud a:not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_alterbd'); jQuery('.vc_tta-accordion .vc_tta-panel-heading .vc_tta-controls-icon:not([class*="sc_button_hover_style_"]),\ .vc_tta-color-grey.vc_tta-style-classic .vc_tta-tab > a:not([class*="sc_button_hover_style_"]),\ .single-product div.product .woocommerce-tabs .wc-tabs li a:not([class*="sc_button_hover_style_"]),\ .sc_button.color_style_dark:not([class*="sc_button_simple"]):not([class*="sc_button_hover_style_"]),\ .slider_prev:not([class*="sc_button_hover_style_"]),\ .slider_next:not([class*="sc_button_hover_style_"]),\ .trx_addons_video_player.with_cover .video_hover:not([class*="sc_button_hover_style_"]),\ .trx_addons_tabs .trx_addons_tabs_titles li a:not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_dark'); jQuery('.sc_price_item_link:not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_extra'); jQuery('.sc_button.color_style_link2:not([class*="sc_button_simple"]):not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_link2'); jQuery('.sc_button.color_style_link3:not([class*="sc_button_simple"]):not([class*="sc_button_hover_style_"])\ ').addClass('sc_button_hover_just_init sc_button_hover_style_link3'); setTimeout(function(){ jQuery('.sc_button_hover_just_init').removeClass('sc_button_hover_just_init'); }, 500); jQuery('.mejs-controls button,\ .mfp-close,\ .sc_button_bg_image,\ .hover_shop_buttons a,\ button.pswp__button,\ .woocommerce-orders-table__cell-order-actions .button,\ .sc_layouts_row_type_narrow .sc_button\ ').removeClass('sc_button_hover_'+FILMAX_STORAGE['button_hover']); }});(function(){ "use strict"; jQuery(document).on('action.add_googlemap_styles', filmax_trx_addons_add_googlemap_styles); jQuery(document).on('action.init_shortcodes', filmax_trx_addons_init); jQuery(document).on('action.init_hidden_elements', filmax_trx_addons_init); function filmax_trx_addons_add_googlemap_styles(e){ if(typeof TRX_ADDONS_STORAGE=='undefined') return; TRX_ADDONS_STORAGE['googlemap_styles']['dark']=[{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#333333"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#ffffff"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#fefefe"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#fefefe"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"lightness":20},{"color":"#13162b"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#13162b"},{"lightness":21}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#5fc6ca"},{"lightness":21}]},{"featureType":"road","elementType":"all","stylers":[{"visibility":"simplified"},{"color":"#cccdd2"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#13162b"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"color":"#ff0000"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#13162b"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#ffffff"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#13162b"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#13162b"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#13162b"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#f4f9fc"},{"lightness":17}]}]; TRX_ADDONS_STORAGE['googlemap_styles']['extra']=[{ "featureType": "water", "elementType": "geometry", "stylers": [{ "color": "#e9e9e9"}, { "lightness": 17}]}, { "featureType": "landscape", "elementType": "geometry", "stylers": [{ "color": "#f5f5f5"}, { "lightness": 20}]}, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{ "color": "#ffffff"}, { "lightness": 17}]}, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [{ "color": "#ffffff"}, { "lightness": 29}, { "weight": 0.2}]}, { "featureType": "road.arterial", "elementType": "geometry", "stylers": [{ "color": "#ffffff"}, { "lightness": 18}]}, { "featureType": "road.local", "elementType": "geometry", "stylers": [{ "color": "#ffffff"}, { "lightness": 16}]}, { "featureType": "poi", "elementType": "geometry", "stylers": [{ "color": "#f5f5f5"}, { "lightness": 21}]}, { "featureType": "poi.park", "elementType": "geometry", "stylers": [{ "color": "#dedede"}, { "lightness": 21}]}, { "elementType": "labels.text.stroke", "stylers": [{ "visibility": "on"}, { "color": "#ffffff"}, { "lightness": 16}]}, { "elementType": "labels.text.fill", "stylers": [{ "saturation": 36}, { "color": "#333333"}, { "lightness": 40}]}, { "elementType": "labels.icon", "stylers": [{ "visibility": "off"}]}, { "featureType": "transit", "elementType": "geometry", "stylers": [{ "color": "#f2f2f2"}, { "lightness": 19}]}, { "featureType": "administrative", "elementType": "geometry.fill", "stylers": [{ "color": "#fefefe"}, { "lightness": 20}]}, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [{ "color": "#fefefe"}, { "lightness": 17}, { "weight": 1.2}]}]; } function filmax_trx_addons_init(e, container){ if(arguments.length < 2) var container=jQuery('body'); if(container===undefined||container.length===undefined||container.length==0) return; container.find('.sc_countdown_item canvas:not(.inited)').addClass('inited').attr('data-color', FILMAX_STORAGE['alter_link_color']); }})(); !function r(a,s,l){function d(n,e){if(!s[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[n]={exports:{}};a[n][0].call(i.exports,function(e){var t=a[n][1][e];return d(t||e)},i,i.exports,r,a,s,l)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e',o.addControlElement(t,"fullscreen"),t.addEventListener("click",function(){m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||n.isFullScreen?n.exitFullScreen():n.enterFullScreen()}),n.fullscreenBtn=t,o.options.keyActions.push({keys:[70],action:function(e,t,n,o){o.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),o.exitFullscreenCallback=function(e){var t=e.which||e.keyCode||0;o.options.enableKeyboard&&27===t&&(m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||o.isFullScreen)&&n.exitFullScreen()},o.globalBind("keydown",o.exitFullscreenCallback),o.normalHeight=0,o.normalWidth=0,m.HAS_TRUE_NATIVE_FULLSCREEN){n.globalBind(m.FULLSCREEN_EVENT_NAME,function(){n.isFullScreen&&(m.isFullScreen()?(n.isNativeFullScreen=!0,n.setControlsSize()):(n.isNativeFullScreen=!1,n.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName),t="";return m.HAS_TRUE_NATIVE_FULLSCREEN&&e?t="native-native":m.HAS_TRUE_NATIVE_FULLSCREEN&&!e?t="plugin-native":this.usePluginFullScreen&&m.SUPPORT_POINTER_EVENTS&&(t="plugin-click"),this.fullscreenMode=t},enterFullScreen:function(){var o=this,e=null!==o.media.rendererName&&/(html5|native)/i.test(o.media.rendererName),t=getComputedStyle(o.getElement(o.container));if(o.isVideo)if(!1===o.options.useFakeFullscreen&&m.IS_IOS&&m.HAS_IOS_FULLSCREEN&&"function"==typeof o.media.originalNode.webkitEnterFullscreen&&o.media.originalNode.canPlayType((0,g.getTypeFromFile)(o.media.getSrc())))o.media.originalNode.webkitEnterFullscreen();else{if((0,v.addClass)(p.default.documentElement,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.getElement(o.container),o.options.classPrefix+"container-fullscreen"),o.normalHeight=parseFloat(t.height),o.normalWidth=parseFloat(t.width),"native-native"!==o.fullscreenMode&&"plugin-native"!==o.fullscreenMode||(m.requestFullScreen(o.getElement(o.container)),o.isInIframe&&setTimeout(function e(){if(o.isNativeFullScreen){var t=f.default.innerWidth||p.default.documentElement.clientWidth||p.default.body.clientWidth,n=screen.width;.002*n',l.addEventListener("click",function(){i.paused?i.play():i.pause()});var d=l.querySelector("button");function u(e){"play"===e?((0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"pause"),d.setAttribute("title",s),d.setAttribute("aria-label",s)):((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"play"),d.setAttribute("title",a),d.setAttribute("aria-label",a))}i.addControlElement(l,"playpause"),u("pse"),o.addEventListener("loadedmetadata",function(){-1===o.rendererName.indexOf("flash")&&u("pse")}),o.addEventListener("play",function(){u("play")}),o.addEventListener("playing",function(){u("play")}),o.addEventListener("pause",function(){u("pse")}),o.addEventListener("ended",function(){e.options.loop||((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.addClass)(l,i.options.classPrefix+"replay"),d.setAttribute("title",a),d.setAttribute("aria-label",a))})}})},{16:16,2:2,26:26,27:27,5:5}],11:[function(e,t,n){"use strict";var p=r(e(2)),o=e(16),i=r(o),m=r(e(5)),y=e(25),E=e(30),b=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(i.default.prototype,{buildprogress:function(h,s,e,d){var u=0,v=!1,c=!1,g=this,t=h.options.autoRewind,n=h.options.enableProgressTooltip?'00:00':"",o=p.default.createElement("div");o.className=g.options.classPrefix+"time-rail",o.innerHTML=''+n+"",g.addControlElement(o,"progress"),g.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&0o+n.left&&(d=o+n.left),a=(l=d-n.left)/o,g.newTime=a*g.getDuration(),v&&null!==g.getCurrentTime()&&g.newTime.toFixed(4)!==g.getCurrentTime().toFixed(4)&&(g.setCurrentRailHandle(g.newTime),g.updateCurrent(g.newTime)),!y.IS_IOS&&!y.IS_ANDROID){if(l<0&&(l=0),g.options.useSmoothHover&&null!==r&&void 0!==window[r]){var u=new window[r](getComputedStyle(g.handle)[i]).m41,c=l/parseFloat(getComputedStyle(g.total).width)-u/parseFloat(getComputedStyle(g.total).width);g.hovered.style.left=u+"px",g.setTransformStyle(g.hovered,"scaleX("+c+")"),g.hovered.setAttribute("pos",l),0<=c?(0,b.removeClass)(g.hovered,"negative"):(0,b.addClass)(g.hovered,"negative")}if(g.timefloat){var f=g.timefloat.offsetWidth/2,p=mejs.Utils.offset(g.getElement(g.container)),m=getComputedStyle(g.timefloat);s=d-p.left=g.getElement(g.container).offsetWidth-f?g.total.offsetWidth-f:l,(0,b.hasClass)(g.getElement(g.container),g.options.classPrefix+"long-video")&&(s+=parseFloat(m.marginLeft)/2+g.timefloat.offsetWidth/2),g.timefloat.style.left=s+"px",g.timefloatcurrent.innerHTML=(0,E.secondsToTimeCode)(g.newTime,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),g.timefloat.style.display="block"}}}else y.IS_IOS||y.IS_ANDROID||!g.timefloat||(s=g.timefloat.offsetWidth+o>=g.getElement(g.container).offsetWidth?g.timefloat.offsetWidth/2:0,g.timefloat.style.left=s+"px",g.timefloat.style.left=s+"px",g.timefloat.style.display="block")},f=function(){1e3<=new Date-u&&g.play()};g.slider.addEventListener("focus",function(){h.options.autoRewind=!1}),g.slider.addEventListener("blur",function(){h.options.autoRewind=t}),g.slider.addEventListener("keydown",function(e){if(1e3<=new Date-u&&(c=g.paused),g.options.enableKeyboard&&g.options.keyActions.length){var t=e.which||e.keyCode||0,n=g.getDuration(),o=h.options.defaultSeekForwardInterval(d),i=h.options.defaultSeekBackwardInterval(d),r=g.getCurrentTime(),a=g.getElement(g.container).querySelector("."+g.options.classPrefix+"volume-slider");if(38===t||40===t){a&&(a.style.display="block"),g.isVideo&&(g.showControls(),g.startControlsTimer());var s=38===t?Math.min(g.volume+.1,1):Math.max(g.volume-.1,0),l=s<=0;return g.setVolume(s),void g.setMuted(l)}switch(a&&(a.style.display="none"),t){case 37:g.getDuration()!==1/0&&(r-=i);break;case 39:g.getDuration()!==1/0&&(r+=o);break;case 36:r=0;break;case 35:r=n;break;case 13:case 32:return void(y.IS_FIREFOX&&(g.paused?g.play():g.pause()));default:return}r=r<0||isNaN(r)?0:n<=r?n:Math.floor(r),u=new Date,c||h.pause(),setTimeout(function(){g.setCurrentTime(r)},0),r | "}),Object.assign(i.default.prototype,{buildcurrent:function(e,t,n,o){var i=this,r=a.default.createElement("div");r.className=i.options.classPrefix+"time",r.setAttribute("role","timer"),r.setAttribute("aria-live","off"),r.innerHTML=''+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"",i.addControlElement(r,"current"),e.updateCurrent(),i.updateTimeCallback=function(){i.controlsAreVisible&&e.updateCurrent()},o.addEventListener("timeupdate",i.updateTimeCallback)},cleancurrent:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,o){var i=this;if(t.lastChild.querySelector("."+i.options.classPrefix+"currenttime"))t.querySelector("."+i.options.classPrefix+"time").innerHTML+=i.options.timeAndDurationSeparator+''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"";else{t.querySelector("."+i.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+i.options.classPrefix+"currenttime").parentNode,i.options.classPrefix+"currenttime-container");var r=a.default.createElement("div");r.className=i.options.classPrefix+"time "+i.options.classPrefix+"duration-container",r.innerHTML=''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"",i.addControlElement(r,"duration")}i.updateDurationCallback=function(){i.controlsAreVisible&&e.updateDuration()},o.addEventListener("timeupdate",i.updateDurationCallback)},cleanduration:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this,t=e.getCurrentTime();isNaN(t)&&(t=0);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5',o.captions.style.display="none",t.insertBefore(o.captions,t.firstChild),o.captionsText=o.captions.querySelector("."+i.options.classPrefix+"captions-text"),o.captionsButton=L.default.createElement("div"),o.captionsButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"captions-button",o.captionsButton.innerHTML='
    ",i.addControlElement(o.captionsButton,"tracks"),o.captionsButton.querySelector("."+i.options.classPrefix+"captions-selector-input").disabled=!1,o.chaptersButton=L.default.createElement("div"),o.chaptersButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"chapters-button",o.chaptersButton.innerHTML='
      ';for(var u=0,c=0;c"},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(var n=0,o=e.tracks.length;n";for(var o=r.chaptersButton.querySelectorAll('input[type="radio"]'),i=r.chaptersButton.querySelectorAll("."+r.options.classPrefix+"chapters-selector-label"),a=0,s=o.length;a>1].start,a=e[i].stop,r<=t&&t ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],o=void 0,i=void 0,r=void 0,a=0,s=t.length;a$1"),n.push({identifier:r,start:0===(0,m.convertSMPTEtoSeconds)(o[1])?.2:(0,m.convertSMPTEtoSeconds)(o[1]),stop:(0,m.convertSMPTEtoSeconds)(o[3]),text:i,settings:o[5]})}r=""}return n}},dfxp:{parse:function(e){var t=(e=$(e).filter("tt")).firstChild,n=t.querySelectorAll("p"),o=e.getElementById(""+t.attr("style")),i=[],r=void 0;if(o.length){o.removeAttribute("id");var a=o.attributes;if(a.length){r={};for(var s=0,l=a.length;s$1"),i.push(f)}return i}}}},{16:16,2:2,26:26,27:27,30:30,5:5,7:7}],14:[function(e,t,n){"use strict";var x=r(e(2)),o=e(16),i=r(o),w=r(e(5)),P=e(25),T=e(27),C=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(i.default.prototype,{buildvolume:function(e,t,n,o){if(!P.IS_ANDROID&&!P.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,s=a.isVideo?a.options.videoVolume:a.options.audioVolume,r=(0,T.isString)(a.options.muteText)?a.options.muteText:w.default.t("mejs.mute"),l=(0,T.isString)(a.options.unmuteText)?a.options.unmuteText:w.default.t("mejs.unmute"),i=(0,T.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:w.default.t("mejs.volume-help-text"),d=x.default.createElement("div");if(d.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",d.innerHTML="horizontal"===s?'':''+i+'
      ',a.addControlElement(d,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&t.matches(":focus")&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),0'+i+'
      ',d.parentNode.insertBefore(u,d.nextSibling)}var c=!1,f=!1,p=!1,m="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),h="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),v="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),g="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),y=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute");var t=d.firstElementChild;t.setAttribute("title",l),t.setAttribute("aria-label",l)}else{(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute");var n=d.firstElementChild;n.setAttribute("title",r),n.setAttribute("aria-label",r)}var o=100*e+"%",i=getComputedStyle(g);"vertical"===s?(v.style.bottom=0,v.style.height=o,g.style.bottom=o,g.style.marginBottom=-parseFloat(i.height)/2+"px"):(v.style.left=0,v.style.width=o,g.style.left=o,g.style.marginLeft=-parseFloat(i.width)/2+"px")}},E=function(e){var t=(0,C.offset)(h),n=getComputedStyle(h);p=!0;var o=null;if("vertical"===s){var i=parseFloat(n.height);if(o=(i-(e.pageY-t.top))/i,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);o=(e.pageX-t.left)/r}o=Math.max(0,o),o=Math.min(o,1),y(o),a.setMuted(0===o),a.setVolume(o),e.preventDefault(),e.stopPropagation()},b=function(){a.muted?(y(0),(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute")):(y(o.volume),(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseenter",function(e){e.target===d&&(m.style.display="block",f=!0,e.preventDefault(),e.stopPropagation())}),d.addEventListener("focusin",function(){m.style.display="block",f=!0}),d.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseleave",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),d.addEventListener("focusout",function(){f=!1}),d.addEventListener("keydown",function(e){if(a.options.enableKeyboard&&a.options.keyActions.length){var t=e.which||e.keyCode||0,n=o.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}c=!1,y(n),o.setVolume(n),e.preventDefault(),e.stopPropagation()}}),d.querySelector("button").addEventListener("click",function(){o.setMuted(!o.muted);var e=(0,T.createEvent)("volumechange",o);o.dispatchEvent(e)}),m.addEventListener("dragstart",function(){return!1}),m.addEventListener("mouseover",function(){f=!0}),m.addEventListener("focusin",function(){m.style.display="block",f=!0}),m.addEventListener("focusout",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),m.addEventListener("mousedown",function(e){E(e),a.globalBind("mousemove.vol",function(e){var t=e.target;c&&(t===m||t.closest("vertical"===s?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&E(e)}),a.globalBind("mouseup.vol",function(){c=!1,f||"vertical"!==s||(m.style.display="none")}),c=!0,e.preventDefault(),e.stopPropagation()}),o.addEventListener("volumechange",function(e){var t;c||b(),t=Math.floor(100*o.volume),m.setAttribute("aria-valuenow",t),m.setAttribute("aria-valuetext",t+"%")});var S=!1;o.addEventListener("rendererready",function(){p||setTimeout(function(){S=!0,(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()},250)}),o.addEventListener("loadedmetadata",function(){setTimeout(function(){p||S||((0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),o.setVolume(e.options.startVolume),a.setControlsSize()),S=!1},250)}),(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),e.options.startVolume=0,b()),a.getElement(a.container).addEventListener("controlsresize",function(){b()})}}})},{16:16,2:2,25:25,26:26,27:27,5:5}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function o(e,t){for(var n=0;n
      ',n.getElement(n.container).addEventListener("focus",function(e){if(!n.controlsAreVisible&&!n.hasFocus&&n.controlsEnabled){n.showControls(!0);var t=(0,m.isNodeAfter)(e.relatedTarget,n.getElement(n.container))?"."+n.options.classPrefix+"controls ."+n.options.classPrefix+"button:last-child > button":"."+n.options.classPrefix+"playpause-button > button";n.getElement(n.container).querySelector(t).focus()}}),n.node.parentNode.insertBefore(n.getElement(n.container),n.node),n.options.features.length||n.options.useDefaultControls||(n.getElement(n.container).style.background="transparent",n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls").style.display="none"),n.isVideo&&"fill"===n.options.stretching&&!P.hasClass(n.getElement(n.container).parentNode,n.options.classPrefix+"fill-container")){n.outerContainer=n.media.parentNode;var r=x.default.createElement("div");r.className=n.options.classPrefix+"fill-container",n.getElement(n.container).parentNode.insertBefore(r,n.getElement(n.container)),r.appendChild(n.getElement(n.container))}w.IS_ANDROID&&P.addClass(n.getElement(n.container),n.options.classPrefix+"android"),w.IS_IOS&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ios"),w.IS_IPAD&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ipad"),w.IS_IPHONE&&P.addClass(n.getElement(n.container),n.options.classPrefix+"iphone"),P.addClass(n.getElement(n.container),n.isVideo?n.options.classPrefix+"video":n.options.classPrefix+"audio"),n.getElement(n.container).querySelector("."+n.options.classPrefix+"mediaelement").appendChild(n.node),(n.media.player=n).controls=n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls"),n.layers=n.getElement(n.container).querySelector("."+n.options.classPrefix+"layers");var a=n.isVideo?"video":"audio",s=a.substring(0,1).toUpperCase()+a.substring(1);0=n.width?n.width/n.height:n.height/n.width,n.setPlayerSize(n.width,n.height),e.pluginWidth=n.width,e.pluginHeight=n.height}if(f.default.MepDefaults=e,new d.default(n.media,e,n.mediaFiles),void 0!==n.getElement(n.container)&&n.options.features.length&&n.controlsAreVisible&&!n.options.hideVideoControlsOnLoad){var l=(0,m.createEvent)("controlsshown",n.getElement(n.container));n.getElement(n.container).dispatchEvent(l)}}},{key:"showControls",value:function(e){var i=this;if(e=void 0===e||e,!i.controlsAreVisible&&i.isVideo){if(e)!function(){P.fadeIn(i.getElement(i.controls),200,function(){P.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen");var e=(0,m.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){P.fadeIn(n[e],200,function(){P.removeClass(n[e],i.options.classPrefix+"offscreen")})},t=0,o=n.length;t'),e.message&&(a="

      "+e.message+"

      "),e.urls)for(var d=0,u=e.urls.length;d'+f.default.i18n.t("mejs.download-file")+": "+c.src+""}}a&&o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error")&&(r.innerHTML=a,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").innerHTML=""+s+r.outerHTML,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").parentNode.style.display="block"),o.controlsEnabled&&o.disableControls()}},{key:"setPlayerSize",value:function(e,t){var n=this;if(!n.options.setDimensions)return!1;switch(void 0!==e&&(n.width=e),void 0!==t&&(n.height=t),n.options.stretching){case"fill":n.isVideo?n.setFillMode():n.setDimensions(n.width,n.height);break;case"responsive":n.setResponsiveMode();break;case"none":n.setDimensions(n.width,n.height);break;default:!0===n.hasFluidMode()?n.setResponsiveMode():n.setDimensions(n.width,n.height)}}},{key:"hasFluidMode",value:function(){var e=this;return-1!==e.height.toString().indexOf("%")||e.node&&e.node.style.maxWidth&&"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width||e.node&&e.node.currentStyle&&"100%"===e.node.currentStyle.maxWidth}},{key:"setResponsiveMode",value:function(){var e,o=this,t=function(){for(var t=void 0,n=o.getElement(o.container);n;){try{if(w.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&P.visible(t))return t;n=t}return null}(),n=t?getComputedStyle(t,null):getComputedStyle(x.default.body,null),i=o.isVideo?o.node.videoWidth&&0=o.width?o.node.videoWidth/o.node.videoHeight:o.node.videoHeight/o.node.videoWidth:o.initialAspectRatio,(isNaN(e)||e<.01||100=o.width?parseFloat(d/a,10):parseFloat(d*a,10):r,isNaN(l)&&(l=s),0img");a&&(a.style.display="");for(var s=e.getElement(e.container).querySelectorAll("object, embed, iframe, video"),l=e.height,d=e.width,u=i,c=l*i/d,f=d*r/l,p=r,m=i',n.appendChild(r),a.style.display="none",a.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",a.innerHTML='
      ',n.appendChild(a),s.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer "+i.options.classPrefix+"overlay-play",s.innerHTML='
      ',s.addEventListener("click",function(){if(i.options.clickToPlayPause){var e=i.getElement(i.container).querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");i.paused?i.play():i.pause(),e.setAttribute("aria-pressed",!!t),i.getElement(i.container).focus()}}),s.addEventListener("keydown",function(e){var t=e.keyCode||e.which||0;if(13===t||w.IS_FIREFOX&&32===t){var n=(0,m.createEvent)("click",s);return s.dispatchEvent(n),!1}}),n.appendChild(s),null!==i.media.rendererName&&(/(youtube|facebook)/i.test(i.media.rendererName)&&!(i.media.originalNode.getAttribute("poster")||t.options.poster||"function"==typeof i.media.renderer.getPosterUrl&&i.media.renderer.getPosterUrl())||w.IS_STOCK_ANDROID||i.media.originalNode.getAttribute("autoplay"))&&(s.style.display="none");var l=!1;o.addEventListener("play",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("playing",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("seeking",function(){s.style.display="none",r.style.display="",l=!1}),o.addEventListener("seeked",function(){s.style.display=i.paused&&!w.IS_STOCK_ANDROID?"":"none",r.style.display="none",l=!1}),o.addEventListener("pause",function(){r.style.display="none",w.IS_STOCK_ANDROID||l||(s.style.display=""),l=!1}),o.addEventListener("waiting",function(){r.style.display="",l=!1}),o.addEventListener("loadeddata",function(){r.style.display="",w.IS_ANDROID&&(o.canplayTimeout=setTimeout(function(){if(x.default.createEvent){var e=x.default.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),o.dispatchEvent(e)}},300)),l=!1}),o.addEventListener("canplay",function(){r.style.display="none",clearTimeout(o.canplayTimeout),l=!1}),o.addEventListener("error",function(e){i._handleError(e,i.media,i.node),r.style.display="none",s.style.display="none",l=!0}),o.addEventListener("loadedmetadata",function(){i.controlsEnabled||i.enableControls()}),o.addEventListener("keydown",function(e){i.onkeydown(t,o,e),l=!1})}}},{key:"buildkeyboard",value:function(o,e,t,i){var r=this;r.getElement(r.container).addEventListener("keydown",function(){r.keyboardAction=!0}),r.globalKeydownCallback=function(e){var t=x.default.activeElement.closest("."+r.options.classPrefix+"container"),n=r.media.closest("."+r.options.classPrefix+"container");return r.hasFocus=!(!t||!n||t.id!==n.id),r.onkeydown(o,i,e)},r.globalClickCallback=function(e){r.hasFocus=!!e.target.closest("."+r.options.classPrefix+"container")},r.globalBind("keydown",r.globalKeydownCallback),r.globalBind("click",r.globalClickCallback)}},{key:"onkeydown",value:function(e,t,n){if(e.hasFocus&&e.options.enableKeyboard)for(var o=0,i=e.options.keyActions.length;oimg");(e&&l.node.setAttribute("poster",e.src),delete l.node.autoplay,l.node.setAttribute("src",""),""!==l.media.canPlayType((0,p.getTypeFromFile)(u))&&l.node.setAttribute("src",u),d&&-1t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,o,i){r.plugins[e]=r.detectPlugin(t,n,o,i)},detectPlugin:function(e,t,n,o){var i=[0,0,0],r=void 0,a=void 0;if(null!==F.NAV.plugins&&void 0!==F.NAV.plugins&&"object"===d(F.NAV.plugins[e])){if((r=F.NAV.plugins[e].description)&&(void 0===F.NAV.mimeTypes||!F.NAV.mimeTypes[t]||F.NAV.mimeTypes[t].enabledPlugin))for(var s=0,l=(i=r.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;s
      '+N.default.t("mejs.install-flash")+"
      "}else x=['id="__'+r.id+'"','name="__'+r.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+r.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+r.options.pluginPath+r.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(x.push('width="'+S+'"'),x.push('height="'+b+'"')):x.push('style="position: fixed; left: -9999em; top: -9999em;"'),r.flashWrapper.innerHTML="";if(r.flashNode=r.flashWrapper.lastChild,r.hide=function(){o=!1,E&&(r.flashNode.style.display="none")},r.show=function(){o=!0,E&&(r.flashNode.style.display="")},r.setSize=function(e,t){r.flashNode.style.width=e+"px",r.flashNode.style.height=t+"px",null!==r.flashApi&&"function"==typeof r.flashApi.fire_setSize&&r.flashApi.fire_setSize(e,t)},r.destroy=function(){r.flashNode.remove()},n&&0":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function s(o,i){var r=this,a=arguments,s=2x',t.firstChild.href}function d(e){var t=1'+mejsL10n.strings["mejs.download-file"]+""},n(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(e)}}},n(e.wp.mediaelement.initialize)}(window,jQuery); !function(c,d){"use strict";var e=!1,n=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},!c.wp.receiveEmbedMessage)if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=0;o=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)):(index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length,index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?length-1:index-1,$tabs.tabs("option","active",index))})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,active_tab,collapsible,$this=jQuery(this);$this.attr("data-interval"),collapsible=!1===(active_tab=!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).on("click",function(e){e&&e.preventDefault&&e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0);getColumnsCount(jQuery(this));jQuery(this).hasClass("columns_count_1")&&900;var carousel_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousel_li.css({"margin-right":carousel_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).on("resize",function(){screen_size!=(screen_size=getSizeName())&&window.setTimeout(function(){location.reload()},20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1')}),vc_initVideoBackgrounds(),callSkrollInit=!1,window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSize,skrollrStart,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),($parallaxElement=$("
      ").addClass("vc_parallax-inner").appendTo($(this))).height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),(youtubeId=vcExtractYoutubeId(parallaxImage))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrStart=-(skrollrSize-100),$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: 0%;")}),callSkrollInit&&window.skrollr&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();function getSizeName(){var screen_w=jQuery(window).width();return 1170
      ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px"):(iframeH=(iframeW=containerW)*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px"),iframeW+="px",iframeH+="px",$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.on("click",function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.on("mouseleave",function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),perspective=4*$this.width()+"px";$this.css("perspective",perspective)})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=backHeight